Subject: Re: git shortlog --committer vs --committer=<pattern>

From: Junio C Hamano <[email-masked]>
Date: Tue, 13 Jan 2026 07:52:35 -0800

Manuel Rego Casasnovas <[email-masked]> 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".