From: Pierre Habouzit Date: Tue, 11 Dec 2007 15:24:12 GMT Subject: Re: [PATCH] Invert numbers and names in the git-shortlog summary mode. Message-ID: <20071211152412.GB15448@artemis.madism.org> In-Reply-To: <20071211145709.GB19427@elte.hu> On Tue, Dec 11, 2007 at 02:57:09PM +0000, Ingo Molnar wrote: > > * Pierre Habouzit wrote: > > > 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 > > 6 Johannes Schindelin > > 6 Kristian Høgsberg > > 2 Jeff King > > 1 Alex Riesen > > 1 Pierre Habouzit > > 1 Shawn Bohrer > > 1 Wincent Colaiuta > > 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