summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6d6ab61)
raw | patch | inline | side by side (parent: 6d6ab61)
author | Nicolas Pitre <nico@cam.org> | |
Tue, 21 Nov 2006 20:49:45 +0000 (15:49 -0500) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Tue, 21 Nov 2006 22:31:34 +0000 (14:31 -0800) |
Another small patch to fix the output result to be conform with the
perl version.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
perl version.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-shortlog.c | patch | blob | history |
diff --git a/builtin-shortlog.c b/builtin-shortlog.c
index 1456e1a1914c0a5a0f0009ef391066d1d67d5280..b760b477ea40e7826982f3578ea17c49dd32492e 100644 (file)
--- a/builtin-shortlog.c
+++ b/builtin-shortlog.c
#include <string.h>
static const char shortlog_usage[] =
-"git-shortlog [-n] [-s] [<commit-id>... ]\n";
+"git-shortlog [-n] [-s] [<commit-id>... ]";
static int compare_by_number(const void *a1, const void *a2)
{
for (i = 0; i < list.nr; i++) {
struct path_list *onelines = list.items[i].util;
- printf("%s (%d):\n", list.items[i].path, onelines->nr);
- if (!summary) {
+ if (summary) {
+ printf("%s: %d\n", list.items[i].path, onelines->nr);
+ } else {
+ printf("%s (%d):\n", list.items[i].path, onelines->nr);
for (j = onelines->nr - 1; j >= 0; j--)
printf(" %s\n", onelines->items[j].path);
printf("\n");