summaryrefslogtreecommitdiff
path: root/builtin-apply.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-11-24 11:46:40 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-11-24 11:46:40 (GMT)
commit54acddce99ee0260b7b0a47fda3e2f74c3b983c3 (patch)
tree678cb8af86a135e92cc5dc58f4dfa4c1e055a18b /builtin-apply.c
parent5b6be4ccb5fe45fba7ab6b9c332ed96ca806693f (diff)
parentef58d9587ebad999b3decfcf369ba3b4ff72b121 (diff)
downloadgit-54acddce99ee0260b7b0a47fda3e2f74c3b983c3.zip
git-54acddce99ee0260b7b0a47fda3e2f74c3b983c3.tar.gz
git-54acddce99ee0260b7b0a47fda3e2f74c3b983c3.tar.bz2
Merge branch 'jc/numstat'
* jc/numstat: apply --numstat: mark binary diffstat with - -, not 0 0
Diffstat (limited to 'builtin-apply.c')
-rw-r--r--builtin-apply.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/builtin-apply.c b/builtin-apply.c
index 61f047f..436d9e1 100644
--- a/builtin-apply.c
+++ b/builtin-apply.c
@@ -2119,7 +2119,11 @@ static void numstat_patch_list(struct patch *patch)
for ( ; patch; patch = patch->next) {
const char *name;
name = patch->new_name ? patch->new_name : patch->old_name;
- printf("%d\t%d\t", patch->lines_added, patch->lines_deleted);
+ if (patch->is_binary)
+ printf("-\t-\t");
+ else
+ printf("%d\t%d\t",
+ patch->lines_added, patch->lines_deleted);
if (line_termination && quote_c_style(name, NULL, NULL, 0))
quote_c_style(name, NULL, stdout, 0);
else