{"thread":{"id":"64352","subject":"[PATCH] completion: complete some 'git log' options","startedAt":"2025-10-19T12:57:49Z","lastAt":"2025-10-20T18:08:37Z","messageCount":5,"participants":["KIYOTA Fumiya via GitGitGadget","Junio C Hamano","清田郁弥"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"529143","messageId":"pull.2073.git.git.1760878666840.gitgitgadget@gmail.com","threadId":"64352","inReplyTo":null,"subject":"[PATCH] completion: complete some 'git log' options","fromName":"KIYOTA Fumiya via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2025-10-19T12:57:46Z","receivedAt":"2025-10-19T12:57:49Z","isPatch":true,"sender":{"key":"name:KIYOTA Fumiya","avatar":null},"body":"From: KIYOTA Fumiya <aimluck.kiyota@gmail.com>\n\n1. '--exclude=' option to 'git log' and 'git shortlog' are missing. Add the\noption to __git_log_shortlog_options.\n\n2. The `--committer` option in `git log` requires a pattern, such as\n`--committer=ba`, but in `git shortlog`, specifying a pattern results in\nan error: “error: option `committer' takes no value.” Therefore, I’ll\nhandle them as separate options for completion rather than a shared one.\n\nSigned-off-by: KIYOTA Fumiya <aimluck.kiyota@gmail.com>\n---\n    completion: complete some 'git log' options\n    \n     1. '--exclude=' option to 'git log' and 'git shortlog' are missing. Add\n        the option to __git_log_shortlog_options.\n    \n     2. The --committer option in git log requires a pattern, such as\n        --committer=ba, but in git shortlog, specifying a pattern results in\n        an error: “error: option `committer' takes no value.” Therefore,\n        I’ll handle them as separate options for completion rather than a\n        shared one.\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2073%2FFKbelm%2FlogCompletion-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2073/FKbelm/logCompletion-v1\nPull-Request: https://github.com/git/git/pull/2073\n\n contrib/completion/git-completion.bash | 5 +++--\n 1 file changed, 3 insertions(+), 2 deletions(-)\n\ndiff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\nindex e3d88b0672..73abea31b4 100644\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -2218,7 +2218,7 @@ __git_log_gitk_options=\"\n \"\n # Options that go well for log and shortlog (not gitk)\n __git_log_shortlog_options=\"\n-\t--author= --committer= --grep=\n+\t--author= --grep= --exclude=\n \t--all-match --invert-grep\n \"\n # Options accepted by log and show\n@@ -2296,6 +2296,7 @@ __git_complete_log_opts ()\n \t\t\t$__git_log_shortlog_options\n \t\t\t$__git_log_gitk_options\n \t\t\t$__git_log_show_options\n+\t\t\t--committer=\n \t\t\t--root --topo-order --date-order --reverse\n \t\t\t--follow --full-diff\n \t\t\t--abbrev-commit --no-abbrev-commit --abbrev=\n@@ -3229,7 +3230,7 @@ _git_shortlog ()\n \t\t__gitcomp \"\n \t\t\t$__git_log_common_options\n \t\t\t$__git_log_shortlog_options\n-\t\t\t--numbered --summary --email\n+\t\t\t--committer --numbered --summary --email\n \t\t\t\"\n \t\treturn\n \t\t;;\n\nbase-commit: 4253630c6f07a4bdcc9aa62a50e26a4d466219d1\n-- \ngitgitgadget\n"},{"id":"529149","messageId":"xmqqecqy3mf6.fsf@gitster.g","threadId":"64352","inReplyTo":"pull.2073.git.git.1760878666840.gitgitgadget@gmail.com","subject":"Re: [PATCH] completion: complete some 'git log' options","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-10-19T16:07:25Z","receivedAt":"2025-10-19T16:07:29Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"KIYOTA Fumiya via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n\n> From: KIYOTA Fumiya <aimluck.kiyota@gmail.com>\n>\n> 1. '--exclude=' option to 'git log' and 'git shortlog' are missing. Add the\n> option to __git_log_shortlog_options.\n\nNice.\n\n> 2. The `--committer` option in `git log` requires a pattern, such as\n> `--committer=ba`, but in `git shortlog`, specifying a pattern results in\n> an error: “error: option `committer' takes no value.” Therefore, I’ll\n> handle them as separate options for completion rather than a shared one.\n\n\"Therefore, I'll h\" -> \"H\" then the result matches the previous one\nto describe the solution as if you are giving an order to somebody\nsitting at the keyboard and making the changes for you, which is the\nstyle this project uses.\n\nVery good observation to notice the latter issue.  Has it been\nraised as a bug that shortlog uses --committer in a way inconsistent\nwith the rest of the log family of commands?  Perhaps people often\ndo not limit shortlog by committers like they limit by authors, but\n\"group by committer\" that is squatting on an option that users would\nexpect to be used for \"limit to a given committer\" does sound like a\nsmall UI glitch to me.\n\nWill queue.  Thanks.\n\n\n> Signed-off-by: KIYOTA Fumiya <aimluck.kiyota@gmail.com>\n> ---\n>     completion: complete some 'git log' options\n>     \n>      1. '--exclude=' option to 'git log' and 'git shortlog' are missing. Add\n>         the option to __git_log_shortlog_options.\n>     \n>      2. The --committer option in git log requires a pattern, such as\n>         --committer=ba, but in git shortlog, specifying a pattern results in\n>         an error: “error: option `committer' takes no value.” Therefore,\n>         I’ll handle them as separate options for completion rather than a\n>         shared one.\n>\n> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2073%2FFKbelm%2FlogCompletion-v1\n> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2073/FKbelm/logCompletion-v1\n> Pull-Request: https://github.com/git/git/pull/2073\n>\n>  contrib/completion/git-completion.bash | 5 +++--\n>  1 file changed, 3 insertions(+), 2 deletions(-)\n>\n> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\n> index e3d88b0672..73abea31b4 100644\n> --- a/contrib/completion/git-completion.bash\n> +++ b/contrib/completion/git-completion.bash\n> @@ -2218,7 +2218,7 @@ __git_log_gitk_options=\"\n>  \"\n>  # Options that go well for log and shortlog (not gitk)\n>  __git_log_shortlog_options=\"\n> -\t--author= --committer= --grep=\n> +\t--author= --grep= --exclude=\n>  \t--all-match --invert-grep\n>  \"\n>  # Options accepted by log and show\n> @@ -2296,6 +2296,7 @@ __git_complete_log_opts ()\n>  \t\t\t$__git_log_shortlog_options\n>  \t\t\t$__git_log_gitk_options\n>  \t\t\t$__git_log_show_options\n> +\t\t\t--committer=\n>  \t\t\t--root --topo-order --date-order --reverse\n>  \t\t\t--follow --full-diff\n>  \t\t\t--abbrev-commit --no-abbrev-commit --abbrev=\n> @@ -3229,7 +3230,7 @@ _git_shortlog ()\n>  \t\t__gitcomp \"\n>  \t\t\t$__git_log_common_options\n>  \t\t\t$__git_log_shortlog_options\n> -\t\t\t--numbered --summary --email\n> +\t\t\t--committer --numbered --summary --email\n>  \t\t\t\"\n>  \t\treturn\n>  \t\t;;\n>\n> base-commit: 4253630c6f07a4bdcc9aa62a50e26a4d466219d1\n"},{"id":"529182","messageId":"AF20FE9C-7AB1-42CE-9863-95CFEF43BF9C@gmail.com","threadId":"64352","inReplyTo":"xmqqecqy3mf6.fsf@gitster.g","subject":"Re: [PATCH] completion: complete some 'git log' options","fromName":"清田郁弥","fromEmail":"aimluck.kiyota@gmail.com","sentAt":"2025-10-20T17:27:35Z","receivedAt":"2025-10-20T17:27:50Z","isPatch":true,"sender":{"key":"aimluck.kiyota@gmail.com","avatar":null},"body":"\n\n> 2025/10/20 1:07、Junio C Hamano <gitster@pobox.com>のメール:\n> \n> \"KIYOTA Fumiya via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n> \n>> From: KIYOTA Fumiya <aimluck.kiyota@gmail.com>\n>> \n>> 1. '--exclude=' option to 'git log' and 'git shortlog' are missing. Add the\n>> option to __git_log_shortlog_options.\n> \n> Nice.\n> \n>> 2. The `--committer` option in `git log` requires a pattern, such as\n>> `--committer=ba`, but in `git shortlog`, specifying a pattern results in\n>> an error: “error: option `committer' takes no value.” Therefore, I’ll\n>> handle them as separate options for completion rather than a shared one.\n> \n> \"Therefore, I'll h\" -> \"H\" then the result matches the previous one\n> to describe the solution as if you are giving an order to somebody\n> sitting at the keyboard and making the changes for you, which is the\n> style this project uses.\nThanks, I'll update the commit message.\n\n> Very good observation to notice the latter issue.  Has it been\n> raised as a bug that shortlog uses --committer in a way inconsistent\n> with the rest of the log family of commands?  Perhaps people often\n> do not limit shortlog by committers like they limit by authors, but\n> \"group by committer\" that is squatting on an option that users would\n> expect to be used for \"limit to a given committer\" does sound like a\n> small UI glitch to me.\n> \n> Will queue.  Thanks.\nI’m not sure whether this is a known issue, but for now, I think it’s best to align with the current implementation (i.e., as in this patch) and add completion for 'git shortlog —exclude=' later when the bug is fixed.\n\n> \n> \n>> Signed-off-by: KIYOTA Fumiya <aimluck.kiyota@gmail.com>\n>> ---\n>>    completion: complete some 'git log' options\n>> \n>>     1. '--exclude=' option to 'git log' and 'git shortlog' are missing. Add\n>>        the option to __git_log_shortlog_options.\n>> \n>>     2. The --committer option in git log requires a pattern, such as\n>>        --committer=ba, but in git shortlog, specifying a pattern results in\n>>        an error: “error: option `committer' takes no value.” Therefore,\n>>        I’ll handle them as separate options for completion rather than a\n>>        shared one.\n>> \n>> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2073%2FFKbelm%2FlogCompletion-v1\n>> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2073/FKbelm/logCompletion-v1\n>> Pull-Request: https://github.com/git/git/pull/2073\n>> \n>> contrib/completion/git-completion.bash | 5 +++--\n>> 1 file changed, 3 insertions(+), 2 deletions(-)\n>> \n>> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\n>> index e3d88b0672..73abea31b4 100644\n>> --- a/contrib/completion/git-completion.bash\n>> +++ b/contrib/completion/git-completion.bash\n>> @@ -2218,7 +2218,7 @@ __git_log_gitk_options=\"\n>> \"\n>> # Options that go well for log and shortlog (not gitk)\n>> __git_log_shortlog_options=\"\n>> - --author= --committer= --grep=\n>> + --author= --grep= --exclude=\n>> --all-match --invert-grep\n>> \"\n>> # Options accepted by log and show\n>> @@ -2296,6 +2296,7 @@ __git_complete_log_opts ()\n>> $__git_log_shortlog_options\n>> $__git_log_gitk_options\n>> $__git_log_show_options\n>> + --committer=\n>> --root --topo-order --date-order --reverse\n>> --follow --full-diff\n>> --abbrev-commit --no-abbrev-commit --abbrev=\n>> @@ -3229,7 +3230,7 @@ _git_shortlog ()\n>> __gitcomp \"\n>> $__git_log_common_options\n>> $__git_log_shortlog_options\n>> - --numbered --summary --email\n>> + --committer --numbered --summary --email\n>> \"\n>> return\n>> ;;\n>> \n>> base-commit: 4253630c6f07a4bdcc9aa62a50e26a4d466219d1\n> \n\n"},{"id":"529184","messageId":"pull.2073.v2.git.git.1760981577441.gitgitgadget@gmail.com","threadId":"64352","inReplyTo":"pull.2073.git.git.1760878666840.gitgitgadget@gmail.com","subject":"[PATCH v2] completion: complete some 'git log' options","fromName":"KIYOTA Fumiya via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2025-10-20T17:32:57Z","receivedAt":"2025-10-20T17:32:59Z","isPatch":true,"sender":{"key":"name:KIYOTA Fumiya","avatar":null},"body":"From: KIYOTA Fumiya <aimluck.kiyota@gmail.com>\n\n1. '--exclude=' option to 'git log' and 'git shortlog' are missing. Add the\noption to __git_log_shortlog_options.\n\n2. The `--committer` option in `git log` requires a pattern, such as\n`--committer=ba`, but in `git shortlog`, specifying a pattern results in\nan error: “error: option `committer' takes no value.” Handle them as\nseparate options for completion rather than a shared one.\n\nSigned-off-by: KIYOTA Fumiya <aimluck.kiyota@gmail.com>\n---\n    completion: complete some 'git log' options\n    \n    Change since v1:\n    \n     * Make the commit message follow the Git project’s style.\n    \n    v1:\n    \n     1. '--exclude=' option to 'git log' and 'git shortlog' are missing. Add\n        the option to __git_log_shortlog_options.\n    \n     2. The --committer option in git log requires a pattern, such as\n        --committer=ba, but in git shortlog, specifying a pattern results in\n        an error: “error: option `committer' takes no value.” Therefore,\n        I’ll handle them as separate options for completion rather than a\n        shared one.\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2073%2FFKbelm%2FlogCompletion-v2\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2073/FKbelm/logCompletion-v2\nPull-Request: https://github.com/git/git/pull/2073\n\nRange-diff vs v1:\n\n 1:  2887b0e6c9 ! 1:  d8edd3653a completion: complete some 'git log' options\n     @@ Commit message\n      \n          2. The `--committer` option in `git log` requires a pattern, such as\n          `--committer=ba`, but in `git shortlog`, specifying a pattern results in\n     -    an error: “error: option `committer' takes no value.” Therefore, I’ll\n     -    handle them as separate options for completion rather than a shared one.\n     +    an error: “error: option `committer' takes no value.” Handle them as\n     +    separate options for completion rather than a shared one.\n      \n          Signed-off-by: KIYOTA Fumiya <aimluck.kiyota@gmail.com>\n      \n\n\n contrib/completion/git-completion.bash | 5 +++--\n 1 file changed, 3 insertions(+), 2 deletions(-)\n\ndiff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\nindex e3d88b0672..73abea31b4 100644\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -2218,7 +2218,7 @@ __git_log_gitk_options=\"\n \"\n # Options that go well for log and shortlog (not gitk)\n __git_log_shortlog_options=\"\n-\t--author= --committer= --grep=\n+\t--author= --grep= --exclude=\n \t--all-match --invert-grep\n \"\n # Options accepted by log and show\n@@ -2296,6 +2296,7 @@ __git_complete_log_opts ()\n \t\t\t$__git_log_shortlog_options\n \t\t\t$__git_log_gitk_options\n \t\t\t$__git_log_show_options\n+\t\t\t--committer=\n \t\t\t--root --topo-order --date-order --reverse\n \t\t\t--follow --full-diff\n \t\t\t--abbrev-commit --no-abbrev-commit --abbrev=\n@@ -3229,7 +3230,7 @@ _git_shortlog ()\n \t\t__gitcomp \"\n \t\t\t$__git_log_common_options\n \t\t\t$__git_log_shortlog_options\n-\t\t\t--numbered --summary --email\n+\t\t\t--committer --numbered --summary --email\n \t\t\t\"\n \t\treturn\n \t\t;;\n\nbase-commit: 4253630c6f07a4bdcc9aa62a50e26a4d466219d1\n-- \ngitgitgadget\n"},{"id":"529188","messageId":"xmqqplahzbrx.fsf@gitster.g","threadId":"64352","inReplyTo":"pull.2073.v2.git.git.1760981577441.gitgitgadget@gmail.com","subject":"Re: [PATCH v2] completion: complete some 'git log' options","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-10-20T18:08:34Z","receivedAt":"2025-10-20T18:08:37Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\n[jc: removed these entries from CC list, as my reviews on v1 bounced\n  Revi Ewer <revi.ewer@example.com>,\n  Ill Takalook <ill.takalook@example.net>,\n]\n\n\"KIYOTA Fumiya via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n\n>     Change since v1:\n>     \n>      * Make the commit message follow the Git project’s style.\n\nWill queue.  Thanks.\n"}]}