Re: [PATCH 14/14] shortlog: match commit trailers with --ident
- From
Jeff King <peff@peff.net>
- Date
- Jan 4, 2016, 10:31 UTC
- Message-ID
- <20160104103106.GC32086@sigill.intra.peff.net>
- In-Reply-To
- <CAPig+cTqfd4QezR09QwUb_7viML_4LB5ChNF_eXVCsbGHLaDMQ@mail.gmail.com>
On Mon, Jan 04, 2016 at 04:44:15AM -0500, Eric Sunshine wrote:
Show 16 quoted lines
> On Tue, Dec 29, 2015 at 2:50 AM, Jeff King <peff@peff.net> wrote: > > This doesn't leave us many syntactic "outs" for adding new ident types > > in the future (nor can you match a trailer called "Author"). I guess we > > could call this "--ident=trailer:reviewed-by" to be more precise, but > > it's more annoying to type. Perhaps we could consider that the > > "official" syntax, and DWIM "--ident=foo" to "--ident=trailer:foo", with > > the caveat that it may change in the future. I dunno. > > Would anyone ever want to be able to specify multiple trailers for > counting? That is: > > --ident=trailer:helped-by,reviewed-by > > or > > --ident=trailer:helped-by --ident=trailer:reviewed-by
Generally I'd prefer the latter, as it builds on the existing option parsing rather than inventing a new syntax. But it would also allow mixing trailer and non-trailer items, like:
git shortlog --ident=trailer:helped-by --ident=author
I guess that is well-formed, though I would expect it to be rare. I dunno.
I'd rather punt on handling multiple types in this initial attempt, and let somebody implement that later if they want. I suppose if we did a release with one and then the other, it would technically change the meaning of:
git shortlog --ident=foo --ident=bar
from "just bar, overriding foo" to "both foo and bar". I think I could live with that, though.
-Peff