mirror of
https://github.com/git/git
synced 2024-11-05 18:59:29 +00:00
submodule--helper: don't call submodule_strategy_to_string() in BUG()
Don't call submodule_strategy_to_string() in a BUG() message. These
calls added in c51f8f94e5
(submodule--helper: run update procedures
from C, 2021-08-24) don't need the extra information
submodule_strategy_to_string() gives us, as we'll never reach the
SM_UPDATE_COMMAND case here.
That case is the only one where we'd get any information beyond the
straightforward number-to-string mapping.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Reviewed-by: Glen Choo <chooglen@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
96a907376b
commit
08c2e778d6
1 changed files with 6 additions and 6 deletions
|
@ -2156,8 +2156,8 @@ static int run_update_command(const struct update_data *ud, int subforce)
|
||||||
must_die_on_failure = 1;
|
must_die_on_failure = 1;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
BUG("unexpected update strategy type: %s",
|
BUG("unexpected update strategy type: %d",
|
||||||
submodule_strategy_to_string(&ud->update_strategy));
|
ud->update_strategy.type);
|
||||||
}
|
}
|
||||||
strvec_push(&cp.args, oid);
|
strvec_push(&cp.args, oid);
|
||||||
|
|
||||||
|
@ -2182,8 +2182,8 @@ static int run_update_command(const struct update_data *ud, int subforce)
|
||||||
ud->update_strategy.command, oid, ud->displaypath);
|
ud->update_strategy.command, oid, ud->displaypath);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
BUG("unexpected update strategy type: %s",
|
BUG("unexpected update strategy type: %d",
|
||||||
submodule_strategy_to_string(&ud->update_strategy));
|
ud->update_strategy.type);
|
||||||
}
|
}
|
||||||
if (must_die_on_failure)
|
if (must_die_on_failure)
|
||||||
exit(128);
|
exit(128);
|
||||||
|
@ -2213,8 +2213,8 @@ static int run_update_command(const struct update_data *ud, int subforce)
|
||||||
ud->displaypath, ud->update_strategy.command, oid);
|
ud->displaypath, ud->update_strategy.command, oid);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
BUG("unexpected update strategy type: %s",
|
BUG("unexpected update strategy type: %d",
|
||||||
submodule_strategy_to_string(&ud->update_strategy));
|
ud->update_strategy.type);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in a new issue