Am 08.06.23 um 01:02 schrieb Taylor Blau: > When a shortlog caller wants to group output by, say, author email, they > can easily express this with: > > $ git shortlog --group=format:%ae > > and restrict output to specific email(s) with the new `--group-filter` > option introduced by the previous commit. > > But they are not able to apply the same treatment to identities that > appear in trailers. Doing: > > $ git shortlog -e --group=format:%ae --group=trailer:Co-authored-by > > will produce funky results, interspersing proper emails with full "Name > <email>" identities from the Co-authored-by trailer (or anything else > that might appear there), like: > > 461 me@xxxxxxxxxxxx > 11 Taylor Blau <me@xxxxxxxxxxxx> > > So if the caller wants to restrict output to a set of matching email > addresses (say, "me@xxxxxxxxxxxx"), they cannot do it with a > `--group-filter`, since it would discard the group "Taylor Blau > <me@xxxxxxxxxxxx>". > > Introduce a new `--email-only` option, which extracts the email > component of an identity from all shortlog groups, including trailers. > It behaves similarly to the `-e` option, but replaces its output with > just the email component, instead of adding it on to the end. > > Now, `shortlog` callers can perform: > > $ git shortlog -s --group=author --group=trailer:Co-authored-by \ > --email-only --group-filter="<me@xxxxxxxxxxxx>" > 472 <me@xxxxxxxxxxxx> > > to obtain the output they want. A note from the peanut gallery: "--email-only" sounds like an option that affects the output of the command. But it does not (IIUC), there is no hint that it affects grouping and filtering. It is named too generically, IMHO. Can we not have the desired effect by specifying some token to one of the --group* options? -- Hannes