Re: [PATCH] Invert numbers and names in the git-shortlog summary mode.
- From
Pierre Habouzit <madcoder@debian.org>
- Date
- Dec 11, 2007, 15:24 UTC
- 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:
Show 33 quoted lines
> > * Pierre Habouzit <madcoder@debian.org> 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 <gitster@pobox.com> > > 6 Johannes Schindelin <Johannes.Schindelin@gmx.de> > > 6 Kristian Høgsberg <krh@redhat.com> > > 2 Jeff King <peff@peff.net> > > 1 Alex Riesen <raa.lkml@gmail.com> > > 1 Pierre Habouzit <madcoder@debian.org> > > 1 Shawn Bohrer <shawn.bohrer@gmail.com> > > 1 Wincent Colaiuta <win@wincent.com> > > 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