Skip to content

Commit c568fa8

Browse files
FKbelmgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 16bd9f2 commit c568fa8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

contrib/completion/git-completion.bash

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2218,7 +2218,7 @@ __git_log_gitk_options="
22182218
"
22192219
# Options that go well for log and shortlog (not gitk)
22202220
__git_log_shortlog_options="
2221-
--author= --committer= --grep=
2221+
--author= --grep= --exclude=
22222222
--all-match --invert-grep
22232223
"
22242224
# Options accepted by log and show
@@ -2296,6 +2296,7 @@ __git_complete_log_opts ()
22962296
$__git_log_shortlog_options
22972297
$__git_log_gitk_options
22982298
$__git_log_show_options
2299+
--committer=
22992300
--root --topo-order --date-order --reverse
23002301
--follow --full-diff
23012302
--abbrev-commit --no-abbrev-commit --abbrev=
@@ -3229,7 +3230,7 @@ _git_shortlog ()
32293230
__gitcomp "
32303231
$__git_log_common_options
32313232
$__git_log_shortlog_options
3232-
--numbered --summary --email
3233+
--committer --numbered --summary --email
32333234
"
32343235
return
32353236
;;

0 commit comments

Comments
 (0)