Re: [PATCH] Invert numbers and names in the git-shortlog summary mode.
From: Pierre Habouzit <hidden>
Date: 2016-06-15 22:43:58
On Tue, Dec 11, 2007 at 02:57:09PM +0000, Ingo Molnar wrote:
* Pierre Habouzit [off-list ref] wrote:quoted
Agreed, here is the patch that does that, and a sample output is: $ git shortlog -n -s -e HEAD -- builtin-commit.c 11 Junio C Hamano [off-list ref] 6 Johannes Schindelin [off-list ref] 6 Kristian Høgsberg [off-list ref] 2 Jeff King [off-list ref] 1 Alex Riesen [off-list ref] 1 Pierre Habouzit [off-list ref] 1 Shawn Bohrer [off-list ref] 1 Wincent Colaiuta [off-list ref]great - this looks really neat! btw., stupid question: why are the git-shortlog command line arguments different from git-log? I got used to things like: git-log kernel/ so for me it would be natural to just do: git-shortlog -n -s kernel/ but this currently produces this output: $ git-shortlog -n -s kernel/ (reading log to summarize from standard input) which is quite a bit confusing to someone who'd like to keep as few details of command line arguments in his head as possible :-)
Because git-shortlog insists on you passing a reference first, HEAD is not implicit if you pass something that looks like a path first. This is arguably wrong. What you meant here is: $ git-shortlog -n -s HEAD kernel/ The reason IIRC is that git-shortlog once only read things on stdin, and this keeps backward compatbility to `git-shortlog` without any arguments. Sometimes history hurts :) I don't think there is much we can do on a short timescale. Maybe the old way can be slowly deprecated, and then git-shortlog will be able to act like git-log. -- ·O· Pierre Habouzit ··O madcoder@debian.org OOO http://www.madism.org
Attachments
- (unnamed) [application/pgp-signature] 189 bytes