bisect--helper: fix cmd_*()
function switch default return
In a `cmd_*()` function, return `error()` cannot be used because that translates to `-1` and `cmd_*()` functions need to return exit codes. Let's fix switch default return. 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>
This commit is contained in:

committed by
Junio C Hamano

parent
9fadedd637
commit
36b543b5c9
@ -711,7 +711,7 @@ int cmd_bisect__helper(int argc, const char **argv, const char *prefix)
|
||||
res = bisect_start(&terms, no_checkout, argv, argc);
|
||||
break;
|
||||
default:
|
||||
return error("BUG: unknown subcommand '%d'", cmdmode);
|
||||
BUG("unknown subcommand %d", (int)cmdmode);
|
||||
}
|
||||
free_terms(&terms);
|
||||
|
||||
|
Reference in New Issue
Block a user