From: Miriam Rubio Date: Fri, 28 Aug 2020 12:46:05 +0000 (+0200) Subject: bisect--helper: BUG() in cmd_*() on invalid subcommand X-Git-Tag: v2.29.0-rc0~26^2~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ef5aef5ee0f8ff932f8beb21ff33a4dafee214b5;p=thirdparty%2Fgit.git bisect--helper: BUG() in cmd_*() on invalid subcommand In cmd_bisect__helper() function, if an invalid or no subcommand is passed there is a BUG. BUG() out instead of returning an error. Mentored-by: Christian Couder Mentored-by: Johannes Schindelin Signed-off-by: Miriam Rubio Signed-off-by: Junio C Hamano --- diff --git a/builtin/bisect--helper.c b/builtin/bisect--helper.c index cdda279b23..f464e95792 100644 --- a/builtin/bisect--helper.c +++ b/builtin/bisect--helper.c @@ -720,7 +720,7 @@ int cmd_bisect__helper(int argc, const char **argv, const char *prefix) res = bisect_start(&terms, argv, argc); break; default: - return error("BUG: unknown subcommand '%d'", cmdmode); + BUG("unknown subcommand %d", cmdmode); } free_terms(&terms);