git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] completion: complete some 'git log' options
@ 2025-10-19 12:57 KIYOTA Fumiya via GitGitGadget
  2025-10-19 16:07 ` Junio C Hamano
  2025-10-20 17:32 ` [PATCH v2] " KIYOTA Fumiya via GitGitGadget
  0 siblings, 2 replies; 5+ messages in thread
From: KIYOTA Fumiya via GitGitGadget @ 2025-10-19 12:57 UTC (permalink / raw)
  To: git; +Cc: Revi Ewer, Ill Takalook, KIYOTA Fumiya, KIYOTA Fumiya

From: KIYOTA Fumiya <aimluck.kiyota@gmail.com>

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.” Therefore, I’ll
handle them as separate options for completion rather than a shared one.

Signed-off-by: KIYOTA Fumiya <aimluck.kiyota@gmail.com>
---
    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.” Therefore,
        I’ll handle them as separate options for completion rather than a
        shared one.

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2073%2FFKbelm%2FlogCompletion-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2073/FKbelm/logCompletion-v1
Pull-Request: https://github.com/git/git/pull/2073

 contrib/completion/git-completion.bash | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index e3d88b0672..73abea31b4 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -2218,7 +2218,7 @@ __git_log_gitk_options="
 "
 # Options that go well for log and shortlog (not gitk)
 __git_log_shortlog_options="
-	--author= --committer= --grep=
+	--author= --grep= --exclude=
 	--all-match --invert-grep
 "
 # Options accepted by log and show
@@ -2296,6 +2296,7 @@ __git_complete_log_opts ()
 			$__git_log_shortlog_options
 			$__git_log_gitk_options
 			$__git_log_show_options
+			--committer=
 			--root --topo-order --date-order --reverse
 			--follow --full-diff
 			--abbrev-commit --no-abbrev-commit --abbrev=
@@ -3229,7 +3230,7 @@ _git_shortlog ()
 		__gitcomp "
 			$__git_log_common_options
 			$__git_log_shortlog_options
-			--numbered --summary --email
+			--committer --numbered --summary --email
 			"
 		return
 		;;

base-commit: 4253630c6f07a4bdcc9aa62a50e26a4d466219d1
-- 
gitgitgadget

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] completion: complete some 'git log' options
  2025-10-19 12:57 [PATCH] completion: complete some 'git log' options KIYOTA Fumiya via GitGitGadget
@ 2025-10-19 16:07 ` Junio C Hamano
  2025-10-20 17:27   ` 清田郁弥
  2025-10-20 17:32 ` [PATCH v2] " KIYOTA Fumiya via GitGitGadget
  1 sibling, 1 reply; 5+ messages in thread
From: Junio C Hamano @ 2025-10-19 16:07 UTC (permalink / raw)
  To: KIYOTA Fumiya via GitGitGadget
  Cc: git, Revi Ewer, Ill Takalook, KIYOTA Fumiya, KIYOTA Fumiya

"KIYOTA Fumiya via GitGitGadget" <gitgitgadget@gmail.com> writes:

> From: KIYOTA Fumiya <aimluck.kiyota@gmail.com>
>
> 1. '--exclude=' option to 'git log' and 'git shortlog' are missing. Add the
> option to __git_log_shortlog_options.

Nice.

> 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.” Therefore, I’ll
> handle them as separate options for completion rather than a shared one.

"Therefore, I'll h" -> "H" then the result matches the previous one
to describe the solution as if you are giving an order to somebody
sitting at the keyboard and making the changes for you, which is the
style this project uses.

Very good observation to notice the latter issue.  Has it been
raised as a bug that shortlog uses --committer in a way inconsistent
with the rest of the log family of commands?  Perhaps people often
do not limit shortlog by committers like they limit by authors, but
"group by committer" that is squatting on an option that users would
expect to be used for "limit to a given committer" does sound like a
small UI glitch to me.

Will queue.  Thanks.


> Signed-off-by: KIYOTA Fumiya <aimluck.kiyota@gmail.com>
> ---
>     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.” Therefore,
>         I’ll handle them as separate options for completion rather than a
>         shared one.
>
> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2073%2FFKbelm%2FlogCompletion-v1
> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2073/FKbelm/logCompletion-v1
> Pull-Request: https://github.com/git/git/pull/2073
>
>  contrib/completion/git-completion.bash | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
> index e3d88b0672..73abea31b4 100644
> --- a/contrib/completion/git-completion.bash
> +++ b/contrib/completion/git-completion.bash
> @@ -2218,7 +2218,7 @@ __git_log_gitk_options="
>  "
>  # Options that go well for log and shortlog (not gitk)
>  __git_log_shortlog_options="
> -	--author= --committer= --grep=
> +	--author= --grep= --exclude=
>  	--all-match --invert-grep
>  "
>  # Options accepted by log and show
> @@ -2296,6 +2296,7 @@ __git_complete_log_opts ()
>  			$__git_log_shortlog_options
>  			$__git_log_gitk_options
>  			$__git_log_show_options
> +			--committer=
>  			--root --topo-order --date-order --reverse
>  			--follow --full-diff
>  			--abbrev-commit --no-abbrev-commit --abbrev=
> @@ -3229,7 +3230,7 @@ _git_shortlog ()
>  		__gitcomp "
>  			$__git_log_common_options
>  			$__git_log_shortlog_options
> -			--numbered --summary --email
> +			--committer --numbered --summary --email
>  			"
>  		return
>  		;;
>
> base-commit: 4253630c6f07a4bdcc9aa62a50e26a4d466219d1

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] completion: complete some 'git log' options
  2025-10-19 16:07 ` Junio C Hamano
@ 2025-10-20 17:27   ` 清田郁弥
  0 siblings, 0 replies; 5+ messages in thread
From: 清田郁弥 @ 2025-10-20 17:27 UTC (permalink / raw)
  To: Junio C Hamano
  Cc: KIYOTA Fumiya via GitGitGadget, git, Revi Ewer, Ill Takalook,
	KIYOTA Fumiya



> 2025/10/20 1:07、Junio C Hamano <gitster@pobox.com>のメール:
> 
> "KIYOTA Fumiya via GitGitGadget" <gitgitgadget@gmail.com> writes:
> 
>> From: KIYOTA Fumiya <aimluck.kiyota@gmail.com>
>> 
>> 1. '--exclude=' option to 'git log' and 'git shortlog' are missing. Add the
>> option to __git_log_shortlog_options.
> 
> Nice.
> 
>> 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.” Therefore, I’ll
>> handle them as separate options for completion rather than a shared one.
> 
> "Therefore, I'll h" -> "H" then the result matches the previous one
> to describe the solution as if you are giving an order to somebody
> sitting at the keyboard and making the changes for you, which is the
> style this project uses.
Thanks, I'll update the commit message.

> Very good observation to notice the latter issue.  Has it been
> raised as a bug that shortlog uses --committer in a way inconsistent
> with the rest of the log family of commands?  Perhaps people often
> do not limit shortlog by committers like they limit by authors, but
> "group by committer" that is squatting on an option that users would
> expect to be used for "limit to a given committer" does sound like a
> small UI glitch to me.
> 
> Will queue.  Thanks.
I’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.

> 
> 
>> Signed-off-by: KIYOTA Fumiya <aimluck.kiyota@gmail.com>
>> ---
>>    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.” Therefore,
>>        I’ll handle them as separate options for completion rather than a
>>        shared one.
>> 
>> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2073%2FFKbelm%2FlogCompletion-v1
>> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2073/FKbelm/logCompletion-v1
>> Pull-Request: https://github.com/git/git/pull/2073
>> 
>> contrib/completion/git-completion.bash | 5 +++--
>> 1 file changed, 3 insertions(+), 2 deletions(-)
>> 
>> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
>> index e3d88b0672..73abea31b4 100644
>> --- a/contrib/completion/git-completion.bash
>> +++ b/contrib/completion/git-completion.bash
>> @@ -2218,7 +2218,7 @@ __git_log_gitk_options="
>> "
>> # Options that go well for log and shortlog (not gitk)
>> __git_log_shortlog_options="
>> - --author= --committer= --grep=
>> + --author= --grep= --exclude=
>> --all-match --invert-grep
>> "
>> # Options accepted by log and show
>> @@ -2296,6 +2296,7 @@ __git_complete_log_opts ()
>> $__git_log_shortlog_options
>> $__git_log_gitk_options
>> $__git_log_show_options
>> + --committer=
>> --root --topo-order --date-order --reverse
>> --follow --full-diff
>> --abbrev-commit --no-abbrev-commit --abbrev=
>> @@ -3229,7 +3230,7 @@ _git_shortlog ()
>> __gitcomp "
>> $__git_log_common_options
>> $__git_log_shortlog_options
>> - --numbered --summary --email
>> + --committer --numbered --summary --email
>> "
>> return
>> ;;
>> 
>> base-commit: 4253630c6f07a4bdcc9aa62a50e26a4d466219d1
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v2] completion: complete some 'git log' options
  2025-10-19 12:57 [PATCH] completion: complete some 'git log' options KIYOTA Fumiya via GitGitGadget
  2025-10-19 16:07 ` Junio C Hamano
@ 2025-10-20 17:32 ` KIYOTA Fumiya via GitGitGadget
  2025-10-20 18:08   ` Junio C Hamano
  1 sibling, 1 reply; 5+ messages in thread
From: KIYOTA Fumiya via GitGitGadget @ 2025-10-20 17:32 UTC (permalink / raw)
  To: git; +Cc: Revi Ewer, Ill Takalook, KIYOTA Fumiya, KIYOTA Fumiya

From: KIYOTA Fumiya <aimluck.kiyota@gmail.com>

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>
---
    completion: complete some 'git log' options
    
    Change since v1:
    
     * Make the commit message follow the Git project’s style.
    
    v1:
    
     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.” Therefore,
        I’ll handle them as separate options for completion rather than a
        shared one.

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2073%2FFKbelm%2FlogCompletion-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2073/FKbelm/logCompletion-v2
Pull-Request: https://github.com/git/git/pull/2073

Range-diff vs v1:

 1:  2887b0e6c9 ! 1:  d8edd3653a completion: complete some 'git log' options
     @@ Commit message
      
          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.” Therefore, I’ll
     -    handle them as separate options for completion rather than a shared one.
     +    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>
      


 contrib/completion/git-completion.bash | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index e3d88b0672..73abea31b4 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -2218,7 +2218,7 @@ __git_log_gitk_options="
 "
 # Options that go well for log and shortlog (not gitk)
 __git_log_shortlog_options="
-	--author= --committer= --grep=
+	--author= --grep= --exclude=
 	--all-match --invert-grep
 "
 # Options accepted by log and show
@@ -2296,6 +2296,7 @@ __git_complete_log_opts ()
 			$__git_log_shortlog_options
 			$__git_log_gitk_options
 			$__git_log_show_options
+			--committer=
 			--root --topo-order --date-order --reverse
 			--follow --full-diff
 			--abbrev-commit --no-abbrev-commit --abbrev=
@@ -3229,7 +3230,7 @@ _git_shortlog ()
 		__gitcomp "
 			$__git_log_common_options
 			$__git_log_shortlog_options
-			--numbered --summary --email
+			--committer --numbered --summary --email
 			"
 		return
 		;;

base-commit: 4253630c6f07a4bdcc9aa62a50e26a4d466219d1
-- 
gitgitgadget

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] completion: complete some 'git log' options
  2025-10-20 17:32 ` [PATCH v2] " KIYOTA Fumiya via GitGitGadget
@ 2025-10-20 18:08   ` Junio C Hamano
  0 siblings, 0 replies; 5+ messages in thread
From: Junio C Hamano @ 2025-10-20 18:08 UTC (permalink / raw)
  To: KIYOTA Fumiya via GitGitGadget; +Cc: git, KIYOTA Fumiya, KIYOTA Fumiya


[jc: removed these entries from CC list, as my reviews on v1 bounced
  Revi Ewer <revi.ewer@example.com>,
  Ill Takalook <ill.takalook@example.net>,
]

"KIYOTA Fumiya via GitGitGadget" <gitgitgadget@gmail.com> writes:

>     Change since v1:
>     
>      * Make the commit message follow the Git project’s style.

Will queue.  Thanks.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-10-20 18:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-19 12:57 [PATCH] completion: complete some 'git log' options KIYOTA Fumiya via GitGitGadget
2025-10-19 16:07 ` Junio C Hamano
2025-10-20 17:27   ` 清田郁弥
2025-10-20 17:32 ` [PATCH v2] " KIYOTA Fumiya via GitGitGadget
2025-10-20 18:08   ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).