public inbox for git@vger.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Manuel Rego Casasnovas <rego@igalia.com>
Cc: git@vger.kernel.org
Subject: Re: git shortlog --committer vs --committer=<pattern>
Date: Tue, 13 Jan 2026 07:52:35 -0800	[thread overview]
Message-ID: <xmqqms2hjyrg.fsf@gitster.g> (raw)
In-Reply-To: <e2733434-f632-4be5-a9e0-28412b4043c4@igalia.com> (Manuel Rego Casasnovas's message of "Tue, 13 Jan 2026 16:22:31 +0100")

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".





      parent reply	other threads:[~2026-01-13 15:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqms2hjyrg.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=rego@igalia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox