All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pierre Habouzit <madcoder@debian.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: Jeff King <peff@peff.net>, Jakub Narebski <jnareb@gmail.com>,
	Christian Couder <chriscool@tuxfamily.org>,
	git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: [PATCH] Invert numbers and names in the git-shortlog summary mode.
Date: Tue, 11 Dec 2007 15:43:51 +0100	[thread overview]
Message-ID: <20071211144351.GA15448@artemis.madism.org> (raw)
In-Reply-To: <20071211140508.GA12204@elte.hu>

[-- Attachment #1: Type: text/plain, Size: 1633 bytes --]

Also make it `cut` friendly using a tab to separate the numbers and names.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
---

    On Tue, Dec 11, 2007 at 02:05:08PM +0000, Ingo Molnar wrote:
    > please switch around the column too so that the commit count comes 
    > first, this is way too ugly:
    > 
    >  Junio C Hamano: 4826
    >  Shawn O. Pearce: 1146
    >  Linus Torvalds: 950
    [...]

    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>


 builtin-shortlog.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/builtin-shortlog.c b/builtin-shortlog.c
index 13df0c6..90666cb 100644
--- a/builtin-shortlog.c
+++ b/builtin-shortlog.c
@@ -265,7 +265,7 @@ int cmd_shortlog(int argc, const char **argv, const char *prefix)
 		struct path_list *onelines = list.items[i].util;
 
 		if (summary) {
-			printf("%s: %d\n", list.items[i].path, onelines->nr);
+			printf("%6d\t%s\n", onelines->nr, list.items[i].path);
 		} else {
 			printf("%s (%d):\n", list.items[i].path, onelines->nr);
 			for (j = onelines->nr - 1; j >= 0; j--) {
-- 
1.5.3.7.2226.g8312-dirty


[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2007-12-11 14:44 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-07  9:34 git-bisect feature suggestion: "git-bisect diff" Ingo Molnar
2007-12-07  9:58 ` Junio C Hamano
2007-12-07 10:25   ` Junio C Hamano
2007-12-07 11:21     ` Ingo Molnar
2007-12-07 19:28       ` Junio C Hamano
2007-12-07 19:46         ` Ingo Molnar
2007-12-07 21:34     ` Jeff King
2007-12-07 21:35       ` Jeff King
2007-12-07 21:44         ` Junio C Hamano
2007-12-07 21:55           ` Jeff King
2007-12-07 22:03             ` Junio C Hamano
2007-12-07 22:07               ` Jeff King
2007-12-08  2:54                 ` Junio C Hamano
2007-12-08  5:36 ` Christian Couder
2007-12-08 15:29   ` Ingo Molnar
2007-12-09  5:33     ` git-bisect run make -j64 kernel/ (was Re: git-bisect feature suggestion: "git-bisect diff") Christian Couder
2007-12-12  9:43       ` Ingo Molnar
2007-12-11  9:24   ` git-bisect feature suggestion: "git-bisect diff" Ingo Molnar
2007-12-11  9:29     ` Pierre Habouzit
2007-12-11 10:13       ` Jakub Narebski
2007-12-11 11:59         ` Pierre Habouzit
2007-12-11 12:25           ` Jeff King
2007-12-11 12:33             ` Jeff King
2007-12-11 14:05             ` Ingo Molnar
2007-12-11 14:43               ` Pierre Habouzit [this message]
2007-12-11 14:57                 ` [PATCH] Invert numbers and names in the git-shortlog summary mode Ingo Molnar
2007-12-11 15:24                   ` Pierre Habouzit
2007-12-11 15:34                     ` Nicolas Pitre
2007-12-11 18:09                       ` Junio C Hamano
2007-12-11 15:48                     ` Ingo Molnar
2007-12-11 16:07                       ` Pierre Habouzit
2007-12-11 16:11                         ` Pierre Habouzit
2007-12-11 21:13                         ` Ingo Molnar
2007-12-11 22:21                           ` Junio C Hamano
2007-12-11 17:58                 ` Junio C Hamano
2007-12-11 10:17       ` git-bisect feature suggestion: "git-bisect diff" Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071211144351.GA15448@artemis.madism.org \
    --to=madcoder@debian.org \
    --cc=chriscool@tuxfamily.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jnareb@gmail.com \
    --cc=mingo@elte.hu \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.