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 <britton.kerin@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Britton Leo Kerin committed Feb 6, 2024 at 12:50 UTC 41928aeb45e70d4361c780cc69d3975faee5eec4
2 files changed +12 -1
contrib/completion/git-completion.bash
+1 -1
@@ -1478,7 +1478,7 @@ _git_bisect ()
1478 start)
1479 case "$cur" in
1480 --*)
1481 - __gitcomp "--term-new --term-bad --term-old --term-good"
1481 + __gitcomp "--first-parent --no-checkout --term-new --term-bad --term-old --term-good"
1482 return
1483 ;;
1484 *)
t/t9902-completion.sh
+11
@@ -1271,6 +1271,17 @@ test_expect_success 'git bisect - when not bisecting, complete only replay and s
1271 EOF
1272 '
1273
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 +
1285 test_expect_success 'setup for git-bisect tests requiring a repo' '
1286 git init git-bisect &&
1287 (