git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Nicolas Pitre <nico@cam.org>
Date
Dec 11, 2007, 15:34 UTC
Message-ID
<alpine.LFD.0.99999.0712111032530.555@xanadu.home>
In-Reply-To
<20071211152412.GB15448@artemis.madism.org>
On Tue, 11 Dec 2007, Pierre Habouzit wrote:
Show 48 quoted lines
> On Tue, Dec 11, 2007 at 02:57:09PM +0000, Ingo Molnar wrote:
> > 
> > * 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.
At least, HEAD could be assumed by default when stdin is a tty.
Nicolas
Previous: Pierre HabouzitNext: Junio C Hamano
Message 28 of 36 in “git-bisect feature suggestion: "git-bisect diff"”
  1. Ingo MolnarDec 7, 2007
  2. Junio C HamanoDec 7, 2007
  3. Junio C HamanoDec 7, 2007
  4. Ingo MolnarDec 7, 2007
  5. Junio C HamanoDec 7, 2007
  6. Ingo MolnarDec 7, 2007
  7. Jeff KingDec 7, 2007
  8. Jeff KingDec 7, 2007
  9. Junio C HamanoDec 7, 2007
  10. Jeff KingDec 7, 2007
  11. Junio C HamanoDec 7, 2007
  12. Jeff KingDec 7, 2007
  13. Junio C HamanoDec 8, 2007
  14. Christian CouderDec 8, 2007
  15. Ingo MolnarDec 8, 2007
  16. git-bisect run make -j64 kernel/ (was Re: git-bisect feature suggestion: "git-bisect diff")Christian Couder, Dec 9, 2007
  17. Ingo MolnarDec 12, 2007
  18. Ingo MolnarDec 11, 2007
  19. Pierre HabouzitDec 11, 2007
  20. Jakub NarebskiDec 11, 2007
  21. Pierre HabouzitDec 11, 2007
  22. Jeff KingDec 11, 2007
  23. Jeff KingDec 11, 2007
  24. Ingo MolnarDec 11, 2007
  25. Invert numbers and names in the git-shortlog summary mode.Pierre Habouzit, Dec 11, 2007
  26. Ingo MolnarDec 11, 2007
  27. Pierre HabouzitDec 11, 2007
  28. Nicolas PitreDec 11, 2007
  29. Junio C HamanoDec 11, 2007
  30. Ingo MolnarDec 11, 2007
  31. Pierre HabouzitDec 11, 2007
  32. Pierre HabouzitDec 11, 2007
  33. Ingo MolnarDec 11, 2007
  34. Junio C HamanoDec 11, 2007
  35. Junio C HamanoDec 11, 2007
  36. Ingo MolnarDec 11, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.