Commit 8384a50a2171f57cc1b8158777b124d2022db94e

Sun He 2014-03-05T20:33:20

fix the output format of diff

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/examples/diff.c b/examples/diff.c
index 98480a7..d87edcd 100644
--- a/examples/diff.c
+++ b/examples/diff.c
@@ -324,7 +324,7 @@ static void diff_print_shortstat(git_diff *diff)
 
 	if (ndeltas) {
 
-	    printf(", %ld ", (long)ndeltas);
+	    printf(" %ld ", (long)ndeltas);
 	    printf("%s", 1==ndeltas ? "file changed" : "files changed");
 
 	    if(nadditions_sum) {
@@ -336,6 +336,6 @@ static void diff_print_shortstat(git_diff *diff)
 		printf(", %ld ",ndeletions_sum);
 		printf("%s", 1==ndeletions_sum ? "deletion(-)" : "deletions(-)");
 	    }
+	    printf("\n");
 	}
-	printf("\n");
 }