Junio C Hamano <gitster@xxxxxxxxx> writes: > Sergey Organov <sorganov@xxxxxxxxx> writes: > >> '--dd' only makes sense for 'git log' and 'git show', so add it to >> __git_log_show_options which is referenced in the completion for these >> two commands. >> >> Signed-off-by: Sergey Organov <sorganov@xxxxxxxxx> >> --- >> contrib/completion/git-completion.bash | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash >> index 133ec92bfae7..ca4fa39f3ff8 100644 >> --- a/contrib/completion/git-completion.bash >> +++ b/contrib/completion/git-completion.bash >> @@ -2042,7 +2042,7 @@ __git_log_shortlog_options=" >> " >> # Options accepted by log and show >> __git_log_show_options=" >> - --diff-merges --diff-merges= --no-diff-merges --remerge-diff >> + --diff-merges --diff-merges= --no-diff-merges --dd --remerge-diff >> " >> >> __git_diff_merges_opts="off none on first-parent 1 separate m combined c dense-combined cc remerge r" > > Quite straight-forward. I am kind of surprised that we do not have > to list "--cc" here. Perhaps it is so short and common that people > do not need completion help? > > But that is not a new problem caused by this series, so it is OK. > > Unless "--cc" gets completed without being listed here, using some > automation like the "--git-completion-helper" option, in which case > we may want to see if we can remove all of the above and complete > them the same way as "--cc" gets completed. I didn't check. I checked, though with rather old 2.25.1 running on my Ubuntu, and it is not completed. I think that it's still a good idea to add --cc to completions, so that it's there in the suggested completion list, for the sake of discoverability. That's why I bothered to add --dd to the completions. Thanks, -- Sergey Organov > > Thanks.