completion: complete some 'git log' options
1. '--exclude=' option to 'git log' and 'git shortlog' are missing. Add the option to __git_log_shortlog_options. 2. The `--committer` option in `git log` requires a pattern, such as `--committer=ba`, but in `git shortlog`, specifying a pattern results in an error: “error: option `committer' takes no value.” Handle them as separate options for completion rather than a shared one. Signed-off-by: KIYOTA Fumiya <aimluck.kiyota@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
KIYOTA Fumiya committed
Oct 20, 2025 at 17:32 UTC
c568fa8e1c740c19f8b1cc7efeeef2c6c52961dd
1 file changed
+3
-2
contrib/completion/git-completion.bash
+3
-2
@@ -2218,7 +2218,7 @@ __git_log_gitk_options="
2218
"
2219
# Options that go well for log and shortlog (not gitk)
2220
__git_log_shortlog_options="
2221
- --author= --committer= --grep=
2221
+ --author= --grep= --exclude=
2222
--all-match --invert-grep
2223
"
2224
# Options accepted by log and show
@@ -2296,6 +2296,7 @@ __git_complete_log_opts ()
2296
$__git_log_shortlog_options
2297
$__git_log_gitk_options
2298
$__git_log_show_options
2299
+ --committer=
2300
--root --topo-order --date-order --reverse
2301
--follow --full-diff
2302
--abbrev-commit --no-abbrev-commit --abbrev=
@@ -3229,7 +3230,7 @@ _git_shortlog ()
3230
__gitcomp "
3231
$__git_log_common_options
3232
$__git_log_shortlog_options
3232
- --numbered --summary --email
3233
+ --committer --numbered --summary --email
3234
"
3235
return
3236
;;