summaryrefslogtreecommitdiff
path: root/builtin/bisect--helper.c
diff options
context:
space:
mode:
authorMiriam Rubio <mirucam@gmail.com>2020-08-28 12:46:05 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-08-28 23:21:15 (GMT)
commitef5aef5ee0f8ff932f8beb21ff33a4dafee214b5 (patch)
treed1d2d587a16529413eeeb24bd7c08bd3a0d8ecca /builtin/bisect--helper.c
parente9b77c84a0a0df029f2a3a8114e9f22186e7da24 (diff)
downloadgit-ef5aef5ee0f8ff932f8beb21ff33a4dafee214b5.zip
git-ef5aef5ee0f8ff932f8beb21ff33a4dafee214b5.tar.gz
git-ef5aef5ee0f8ff932f8beb21ff33a4dafee214b5.tar.bz2
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 <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>
Diffstat (limited to 'builtin/bisect--helper.c')
-rw-r--r--builtin/bisect--helper.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/bisect--helper.c b/builtin/bisect--helper.c
index cdda279..f464e95 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);