Re: git shortlog --committer vs --committer=<pattern>
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 13, 2026, 15:52 UTC
- Message-ID
- <xmqqms2hjyrg.fsf@gitster.g>
- In-Reply-To
- <e2733434-f632-4be5-a9e0-28412b4043c4@igalia.com>
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".