bisect--helper: BUG() in cmd_*() on invalid subcommand
authorMiriam Rubio <redacted>
Fri, 28 Aug 2020 12:46:05 +0000 (14:46 +0200)
committerJunio C Hamano <redacted>
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 <redacted>
Mentored-by: Johannes Schindelin <redacted>
Signed-off-by: Miriam Rubio <redacted>
Signed-off-by: Junio C Hamano <redacted>
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);
 
git clone https://git.99rst.org/PROJECT