From: Miriam Rubio Date: Fri, 28 Aug 2020 12:46:05 GMT Subject: [PATCH v6 01/13] bisect--helper: BUG() in cmd_*() on invalid subcommand Message-ID: <20200828124617.60618-2-mirucam@gmail.com> In-Reply-To: <20200828124617.60618-1-mirucam@gmail.com> 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 --- builtin/bisect--helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.25.0