Code

Invert numbers and names in the git-shortlog summary mode.
authorPierre Habouzit <madcoder@debian.org>
Tue, 11 Dec 2007 14:43:51 +0000 (15:43 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 11 Dec 2007 17:57:29 +0000 (09:57 -0800)
Also make it `cut` friendly using a tab to separate the numbers and names.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-shortlog.c

index 13df0c668defa3cdf0770bf52fb9d5af399448ee..90666cbd78732c15566fa8050e666999615b8354 100644 (file)
@@ -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--) {