Re: [PATCH] Invert numbers and names in the git-shortlog summary mode.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Dec 11, 2007 at 02:57:09PM +0000, Ingo Molnar wrote:
> 
> * Pierre Habouzit <madcoder@xxxxxxxxxx> 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@xxxxxxxxx>
> >              6	Johannes Schindelin <Johannes.Schindelin@xxxxxx>
> >              6	Kristian Høgsberg <krh@xxxxxxxxxx>
> >              2	Jeff King <peff@xxxxxxxx>
> >              1	Alex Riesen <raa.lkml@xxxxxxxxx>
> >              1	Pierre Habouzit <madcoder@xxxxxxxxxx>
> >              1	Shawn Bohrer <shawn.bohrer@xxxxxxxxx>
> >              1	Wincent Colaiuta <win@xxxxxxxxxxx>
> 
> 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@xxxxxxxxxx
OOO                                                http://www.madism.org

Attachment: pgpEj4GUXLIZR.pgp
Description: PGP signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux