]> git.ipfire.org Git - thirdparty/git.git/commitdiff
completion: bisect: complete missing --first-parent and - -no-checkout options
authorBritton Leo Kerin <britton.kerin@gmail.com>
Tue, 6 Feb 2024 21:50:45 +0000 (12:50 -0900)
committerJunio C Hamano <gitster@pobox.com>
Tue, 6 Feb 2024 23:11:46 +0000 (15:11 -0800)
The --first-parent and --no-checkout options to the start subcommand of
git-bisect(1) are not completed.

Enable completion of the --first-parent and --no-checkout options to the
start subcommand.  Add test.

Signed-off-by: Britton Leo Kerin <britton.kerin@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/completion/git-completion.bash
t/t9902-completion.sh

index 6a3d9c7760039e152eeed445633b4b13b74cf59d..57c6e09968d45e1b40876fa5650133499e4868a4 100644 (file)
@@ -1478,7 +1478,7 @@ _git_bisect ()
        start)
                case "$cur" in
                --*)
-                       __gitcomp "--term-new --term-bad --term-old --term-good"
+                       __gitcomp "--first-parent --no-checkout --term-new --term-bad --term-old --term-good"
                        return
                        ;;
                *)
index 304903b1a73cc26b3888c16e0594e358fa8dbdab..8fcd1cfa7ef8fcdf40aa2f809dcae116290fd467 100755 (executable)
@@ -1271,6 +1271,17 @@ test_expect_success 'git bisect - when not bisecting, complete only replay and s
        EOF
 '
 
+test_expect_success 'git bisect - complete options to start subcommand' '
+       test_completion "git bisect start --" <<-\EOF
+       --term-new Z
+       --term-bad Z
+       --term-old Z
+       --term-good Z
+       --no-checkout Z
+       --first-parent Z
+       EOF
+'
+
 test_expect_success 'setup for git-bisect tests requiring a repo' '
        git init git-bisect &&
        (