Re: Allow "git shortlog" to group by committer information
- From
Linus Torvalds <torvalds@linux-foundation.org>
- Date
- Oct 11, 2016, 19:07 UTC
- Message-ID
- <CA+55aFzw24pHGOYFBFVvTbU1Cudcr8zcPt_RvdQSxrKY5weCbQ@mail.gmail.com>
- In-Reply-To
- <20161011190103.fovcwsze77hkew4t@sigill.intra.peff.net>
On Tue, Oct 11, 2016 at 12:01 PM, Jeff King <peff@peff.net> wrote:
> > My implementation is a little more complicated because it's also setting > things up for grouping by trailers (so you can group by "signed-off-by", > for example). I don't know if that's useful to your or not.
Hmm. Maybe in theory. But probably not in reality - it's just not unique enough (ie there are generally multiple, and if you choose the first/last, it should be the same as author/committer, so it doesn't actually add anything).
There are possibly other things that *could* be grouped by and might be useful:
- main subdirectory it touches (I've often wanted that)
- rough size of diff or number of files it touches
but realistically both are painful enough that it probably doesn't make sense to do in some low-level helper.
Show 5 quoted lines
> I'm fine with this less invasive version, but a few suggestions: > > - do you want to call it --group-by=committer (with --group-by=author > as the default), which could later extend naturally to other forms of > grouping?
Honestly, it's probably the more generic one, but especially for one-off commands that aren't that common, it's a pain to write. When testing it, I literally just used "-c" for that reason.
I wrote the patch because I've wanted this before, but it's a "once or twice a merge window" thing for me, so ..
> - you might want to steal the tests and documentation from my patch > (though obviously they would need tweaked to match your interface)
Heh. Yes.
Linus