Skip to content

Commit 41928ae

Browse files
bkeringitster
authored andcommitted
completion: bisect: complete missing --first-parent and - -no-checkout options
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent af8910a commit 41928ae

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

contrib/completion/git-completion.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1478,7 +1478,7 @@ _git_bisect ()
14781478
start)
14791479
case "$cur" in
14801480
--*)
1481-
__gitcomp "--term-new --term-bad --term-old --term-good"
1481+
__gitcomp "--first-parent --no-checkout --term-new --term-bad --term-old --term-good"
14821482
return
14831483
;;
14841484
*)

t/t9902-completion.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1271,6 +1271,17 @@ test_expect_success 'git bisect - when not bisecting, complete only replay and s
12711271
EOF
12721272
'
12731273

1274+
test_expect_success 'git bisect - complete options to start subcommand' '
1275+
test_completion "git bisect start --" <<-\EOF
1276+
--term-new Z
1277+
--term-bad Z
1278+
--term-old Z
1279+
--term-good Z
1280+
--no-checkout Z
1281+
--first-parent Z
1282+
EOF
1283+
'
1284+
12741285
test_expect_success 'setup for git-bisect tests requiring a repo' '
12751286
git init git-bisect &&
12761287
(

0 commit comments

Comments
 (0)