apply --numstat: mark binary diffstat with - -, not 0 0
We do not even know number of lines so showing it as 0 0 is lying. This would also help Porcelains like cvsexportcommit. Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano committed
Nov 14, 2006 at 22:23 UTC
ef58d9587ebad999b3decfcf369ba3b4ff72b121
1 file changed
+5
-1
builtin-apply.c
+5
-1
@@ -2116,7 +2116,11 @@ static void numstat_patch_list(struct patch *patch)
2116
for ( ; patch; patch = patch->next) {
2117
const char *name;
2118
name = patch->new_name ? patch->new_name : patch->old_name;
2119
- printf("%d\t%d\t", patch->lines_added, patch->lines_deleted);
2119
+ if (patch->is_binary)
2120
+ printf("-\t-\t");
2121
+ else
2122
+ printf("%d\t%d\t",
2123
+ patch->lines_added, patch->lines_deleted);
2124
if (line_termination && quote_c_style(name, NULL, NULL, 0))
2125
quote_c_style(name, NULL, stdout, 0);
2126
else