diff mbox series

[RFC,6/6] completion: add comment

Message ID ca077105-345a-4c65-a5a8-06c7be879255@smtp-relay.sendinblue.com (mailing list archive)
State Superseded
Headers show
Series completion: improvements for git-bisect | expand

Commit Message

Britton Kerin Jan. 2, 2024, 7:57 p.m. UTC
Signed-off-by: Britton Leo Kerin <britton.kerin@gmail.com>
---
 contrib/completion/git-completion.bash | 6 ++++++
 1 file changed, 6 insertions(+)
diff mbox series

Patch

diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 3bb790220a..7f9a626e1b 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1589,8 +1589,14 @@  _git_bisect ()
 		term_good=`__git bisect terms --term-good`
 	fi
 
+	# We will complete any custom terms, but still always complete the
+	# more usual bad/new/good/old because git bisect gives a good error
+	# message if these are given when not in use and that's better than
+	# silent refusal to complete if the user is confused.
+	#
 	# We want to recognize 'view' but not complete it, because it overlaps
 	# with 'visualize' too much and is just an alias for it.
+	#
 	local completable_subcommands="start bad new $term_bad good old $term_good terms skip reset visualize replay log run help"
 	local all_subcommands="$completable_subcommands view"