public inbox for git@vger.kernel.org
 help / color / mirror / Atom feed
* git shortlog --committer vs --committer=<pattern>
@ 2026-01-13 15:22 Manuel Rego Casasnovas
  2026-01-13 15:49 ` rsbecker
  2026-01-13 15:52 ` Junio C Hamano
  0 siblings, 2 replies; 5+ messages in thread
From: Manuel Rego Casasnovas @ 2026-01-13 15:22 UTC (permalink / raw)
  To: git

Hi,

Doing something like this in a Git repository returns an error (git 
version 2.51.0):
$ git shortlog --committer=foo
error: option `committer' takes no value

However the option "--committer=<pattern>" is in the documentation:
https://git-scm.com/docs/git-shortlog#Documentation/git-shortlog.txt---committerpattern

But it seems to be in conflict with "--committer":
https://git-scm.com/docs/git-shortlog#Documentation/git-shortlog.txt---committer

It would be nice to either allow using "--committer=<pattern>" for 
shortlog, or if that's not possible fix the documentation.

Thanks,
   Rego


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

* RE: git shortlog --committer vs --committer=<pattern>
  2026-01-13 15:22 git shortlog --committer vs --committer=<pattern> Manuel Rego Casasnovas
@ 2026-01-13 15:49 ` rsbecker
  2026-01-13 16:20   ` Pushkar Singh
  2026-01-13 15:52 ` Junio C Hamano
  1 sibling, 1 reply; 5+ messages in thread
From: rsbecker @ 2026-01-13 15:49 UTC (permalink / raw)
  To: 'Manuel Rego Casasnovas', git

On January 13, 2026 10:23 AM, Manuel Rego Casasnovas wrote:
>Doing something like this in a Git repository returns an error (git version 2.51.0):
>$ git shortlog --committer=foo
>error: option `committer' takes no value
>
>However the option "--committer=<pattern>" is in the documentation:
>https://git-scm.com/docs/git-shortlog#Documentation/git-shortlog.txt---
>committerpattern
>
>But it seems to be in conflict with "--committer":
>https://git-scm.com/docs/git-shortlog#Documentation/git-shortlog.txt---
>committer
>
>It would be nice to either allow using "--committer=<pattern>" for shortlog, or if
>that's not possible fix the documentation.

I do not see --committer=<pattern>, but do see --committer pattern in the online
help and documentation. --committer is an alias for --group=committer.
Pattern applies to the log entries.


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

* Re: git shortlog --committer vs --committer=<pattern>
  2026-01-13 15:22 git shortlog --committer vs --committer=<pattern> Manuel Rego Casasnovas
  2026-01-13 15:49 ` rsbecker
@ 2026-01-13 15:52 ` Junio C Hamano
  1 sibling, 0 replies; 5+ messages in thread
From: Junio C Hamano @ 2026-01-13 15:52 UTC (permalink / raw)
  To: Manuel Rego Casasnovas; +Cc: git

Manuel Rego Casasnovas <rego@igalia.com> writes:

> Doing something like this in a Git repository returns an error (git 
> version 2.51.0):
> $ git shortlog --committer=foo
> error: option `committer' takes no value

Thanks for noticing and reporting.

> It would be nice to either allow using "--committer=<pattern>" for 
> shortlog

I took a brief look at the command line parser's source.  It
shouldn't be impossible to improve the status quo, but it would be
impossible to match what other commands in the "git regv-lits"
family of commands like "git log" would do, because "--committer"
can take its <pattern> as a separate parameter.

So it is clear that "git log --committer" (no other parameters) is a
syntax error, "git log --committer -n" (no other parameters) is not
an error but is looking for a committer that match the pattern -n,
but the same reasoning cannot apply for "git shortlog".  Most
notably, "git shortlog --committer -n" cannot behave the same way as
"git shortlog --committer=-n".





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

* Re: git shortlog --committer vs --committer=<pattern>
  2026-01-13 15:49 ` rsbecker
@ 2026-01-13 16:20   ` Pushkar Singh
  2026-01-13 18:01     ` Pushkar Singh
  0 siblings, 1 reply; 5+ messages in thread
From: Pushkar Singh @ 2026-01-13 16:20 UTC (permalink / raw)
  To: rsbecker; +Cc: Manuel Rego Casasnovas, git

Hi Junio,

Thanks for the clarification.

I confirmed that this comes from git-shortlog pulling in
Documentation/rev-list-options.adoc, which documents
--author=<pattern> and --committer=<pattern>, even though
git shortlog treats --committer as an alias for --group=committer
and therefore cannot accept a value.

So this looks like a documentation mismatch rather than just
the website.

I will prepare a documentation patch to make git-shortlog’s
options unambiguous.

Thanks,
Pushkar

On Tue, Jan 13, 2026 at 9:28 PM <rsbecker@nexbridge.com> wrote:
>
> On January 13, 2026 10:23 AM, Manuel Rego Casasnovas wrote:
> >Doing something like this in a Git repository returns an error (git version 2.51.0):
> >$ git shortlog --committer=foo
> >error: option `committer' takes no value
> >
> >However the option "--committer=<pattern>" is in the documentation:
> >https://git-scm.com/docs/git-shortlog#Documentation/git-shortlog.txt---
> >committerpattern
> >
> >But it seems to be in conflict with "--committer":
> >https://git-scm.com/docs/git-shortlog#Documentation/git-shortlog.txt---
> >committer
> >
> >It would be nice to either allow using "--committer=<pattern>" for shortlog, or if
> >that's not possible fix the documentation.
>
> I do not see --committer=<pattern>, but do see --committer pattern in the online
> help and documentation. --committer is an alias for --group=committer.
> Pattern applies to the log entries.
>
>

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

* Re: git shortlog --committer vs --committer=<pattern>
  2026-01-13 16:20   ` Pushkar Singh
@ 2026-01-13 18:01     ` Pushkar Singh
  0 siblings, 0 replies; 5+ messages in thread
From: Pushkar Singh @ 2026-01-13 18:01 UTC (permalink / raw)
  To: rsbecker; +Cc: Manuel Rego Casasnovas, git

Follow up to my previous mail.

After checking the generated git-shortlog(1) and git shortlog --help, both
--committer (grouping) and --committer=<pattern> (commit limiting) are
indeed documented correctly.

The real issue is the option parser ambiguity that Junio described, where
--committer=foo is parsed as the grouping option and rejected, even though
the filtering form exists.

So this is not a documentation error but a command line parsing limitation.
Thanks for the clarification.

On Tue, Jan 13, 2026 at 9:50 PM Pushkar Singh
<pushkarkumarsingh1970@gmail.com> wrote:
>
> Hi Junio,
>
> Thanks for the clarification.
>
> I confirmed that this comes from git-shortlog pulling in
> Documentation/rev-list-options.adoc, which documents
> --author=<pattern> and --committer=<pattern>, even though
> git shortlog treats --committer as an alias for --group=committer
> and therefore cannot accept a value.
>
> So this looks like a documentation mismatch rather than just
> the website.
>
> I will prepare a documentation patch to make git-shortlog’s
> options unambiguous.
>
> Thanks,
> Pushkar
>
> On Tue, Jan 13, 2026 at 9:28 PM <rsbecker@nexbridge.com> wrote:
> >
> > On January 13, 2026 10:23 AM, Manuel Rego Casasnovas wrote:
> > >Doing something like this in a Git repository returns an error (git version 2.51.0):
> > >$ git shortlog --committer=foo
> > >error: option `committer' takes no value
> > >
> > >However the option "--committer=<pattern>" is in the documentation:
> > >https://git-scm.com/docs/git-shortlog#Documentation/git-shortlog.txt---
> > >committerpattern
> > >
> > >But it seems to be in conflict with "--committer":
> > >https://git-scm.com/docs/git-shortlog#Documentation/git-shortlog.txt---
> > >committer
> > >
> > >It would be nice to either allow using "--committer=<pattern>" for shortlog, or if
> > >that's not possible fix the documentation.
> >
> > I do not see --committer=<pattern>, but do see --committer pattern in the online
> > help and documentation. --committer is an alias for --group=committer.
> > Pattern applies to the log entries.
> >
> >

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

end of thread, other threads:[~2026-01-13 18:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-13 15:22 git shortlog --committer vs --committer=<pattern> Manuel Rego Casasnovas
2026-01-13 15:49 ` rsbecker
2026-01-13 16:20   ` Pushkar Singh
2026-01-13 18:01     ` Pushkar Singh
2026-01-13 15:52 ` 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