aboutsummaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-12-13 11:00:32 -0800
committerJunio C Hamano <junkio@cox.net>2006-12-13 11:00:32 -0800
commitf5c589f1dfff428a05b8783688513fe9f98309a2 (patch)
tree5608dd80b856adf25cd177a2b1ed2619ab712dee /diff.c
parentb8fda70de55ba3e4ebcece8a362f1e1da5a4feee (diff)
parentbfddbc5e1e68373ba96441ca228236667912265c (diff)
downloadgit-f5c589f1dfff428a05b8783688513fe9f98309a2.tar.gz
git-f5c589f1dfff428a05b8783688513fe9f98309a2.tar.xz
Merge branch 'jc/numstat'
* jc/numstat: diff --numstat: show binary with '-' to match "apply --numstat"
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/diff.c b/diff.c
index 726b01e75..2df14b246 100644
--- a/diff.c
+++ b/diff.c
@@ -802,7 +802,10 @@ static void show_numstat(struct diffstat_t* data, struct diff_options *options)
for (i = 0; i < data->nr; i++) {
struct diffstat_file *file = data->files[i];
- printf("%d\t%d\t", file->added, file->deleted);
+ if (file->is_binary)
+ printf("-\t-\t");
+ else
+ printf("%d\t%d\t", file->added, file->deleted);
if (options->line_termination &&
quote_c_style(file->name, NULL, NULL, 0))
quote_c_style(file->name, NULL, stdout, 0);