]> git.ipfire.org Git - thirdparty/git.git/commitdiff
bisect--helper: log: allow arbitrary number of arguments
authorĐoàn Trần Công Danh <congdanhqx@gmail.com>
Thu, 10 Nov 2022 16:36:45 +0000 (23:36 +0700)
committerTaylor Blau <me@ttaylorr.com>
Fri, 11 Nov 2022 22:06:01 +0000 (17:06 -0500)
In a later change, we would like to turn bisect into a builtin by
renaming bisect--helper.

However, there's an oddity that "git bisect log" accepts any number of
arguments and it will just ignore them all.

Let's prepare for the next step by ignoring any arguments passed to
"git bisect--helper log"

Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
Signed-off-by: Taylor Blau <me@ttaylorr.com>
builtin/bisect--helper.c
git-bisect.sh

index 29d5a26c648a2d4ba9b38c2e6cde895253f837f1..6066f553fd0201dbb370891e420266ae14ec890f 100644 (file)
@@ -1347,10 +1347,8 @@ static int cmd_bisect__next(int argc, const char **argv UNUSED, const char *pref
        return res;
 }
 
-static int cmd_bisect__log(int argc, const char **argv UNUSED, const char *prefix UNUSED)
+static int cmd_bisect__log(int argc UNUSED, const char **argv UNUSED, const char *prefix UNUSED)
 {
-       if (argc)
-               return error(_("'%s' requires 0 arguments"), "git bisect log");
        return bisect_log();
 }
 
index 9f6c8cc0934c9d2d202c7e0c6abbd9bea164c76d..f95b8103a9e032c4b818ad7bf5249f06b298d3ea 100755 (executable)
@@ -57,8 +57,6 @@ case "$#" in
        case "$cmd" in
        help)
                git bisect -h ;;
-       log)
-               git bisect--helper log || exit ;;
        *)
                git bisect--helper "$cmd" "$@" ;;
        esac