Re: [PATCH 8/8] shortlog: allow multiple groups to be specified

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Sep 25, 2020 at 04:23:39PM -0400, Eric Sunshine wrote:

> > diff --git a/Documentation/git-shortlog.txt b/Documentation/git-shortlog.txt
> > @@ -69,6 +69,11 @@ Shortlog will attempt to parse each trailer value as a `name <email>`
> >  identity. If successful, the mailmap is applied and the email is omitted
> >  unless the `--email` option is specified. If the value cannot be parsed
> >  as an identity, it will be taken literally and completely.
> > ++
> > +If `--group` is specified multiple times, commits are counted under each
> > +value (but again, only once per unique value in that commit). For
> > +example, `git shortlog --group=author --group=trailer:co-authored-by`
> > +counts both authors and co-authors.
> 
> Intuitively, I understand (or hope) that the first use of --group
> overrides what is otherwise collected by default (authors), however,
> would there be value in stating this explicitly?

Yes. Maybe my "if no --group is specified" suggestion from the other
part of the thread _is_ worth doing then.

> At this point, the documentation for --committer still says:
> 
>     --committer::
>         Collect and show committer identities instead of authors.
>         This is an alias for `--group=committer`.
> 
> which stops feeling accurate now that --group can be specified more
> than once. The "instead of authors" bit is particularly jarring. I
> wonder if the first sentence can simply be dropped.

Hmm, yeah. I actually kept --committer different at first, having it
override any other --group options. But that seemed confusing, too
(since it's now _almost_ an alias for --group=committer). I think your
suggestion works to just explicitly mark it as an alias and nothing.

-Peff



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux