aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--contrib/completion/git-completion.bash4
-rwxr-xr-xt/t9902-completion.sh15
2 files changed, 19 insertions, 0 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index b9ebd5e409..5337ae4ce2 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1490,6 +1490,10 @@ _git_bisect ()
__gitcomp "--term-good --term-old --term-bad --term-new"
return
;;
+ visualize)
+ __git_complete_log_opts
+ return
+ ;;
bad|new|"$term_bad"|good|old|"$term_good"|reset|skip)
__git_complete_refs
;;
diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh
index 8fcd1cfa7e..b989388e7e 100755
--- a/t/t9902-completion.sh
+++ b/t/t9902-completion.sh
@@ -1361,6 +1361,21 @@ test_expect_success 'git-bisect - options to terms subcommand are candidates' '
)
'
+test_expect_success 'git-bisect - git-log options to visualize subcommand are candidates' '
+ (
+ cd git-bisect &&
+ # The completion used for git-log and here does not complete
+ # every git-log option, so rather than hope to stay in sync
+ # with exactly what it does we will just spot-test here.
+ test_completion "git bisect visualize --sta" <<-\EOF &&
+ --stat Z
+ EOF
+ test_completion "git bisect visualize --summar" <<-\EOF
+ --summary Z
+ EOF
+ )
+'
+
test_expect_success 'git checkout - completes refs and unique remote branches for DWIM' '
test_completion "git checkout " <<-\EOF
HEAD Z