]> git.ipfire.org Git - thirdparty/git.git/commitdiff
bisect--helper: BUG() in cmd_*() on invalid subcommand
authorMiriam Rubio <mirucam@gmail.com>
Fri, 28 Aug 2020 12:46:05 +0000 (14:46 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 28 Aug 2020 23:21:15 +0000 (16:21 -0700)
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 <chriscool@tuxfamily.org>
Mentored-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Miriam Rubio <mirucam@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/bisect--helper.c

index cdda279b23ca3c8ede39058a52a1b3a0f303b43d..f464e95792394a9f25ccbe7858473691c88e5b5c 100644 (file)
@@ -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);