From: Junio C Hamano Date: Sun, 10 Dec 2006 21:50:59 +0000 (-0800) Subject: diff --numstat: show binary with '-' to match "apply --numstat" X-Git-Tag: v1.5.0-rc0~124^2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=bfddbc5e1e68373ba96441ca228236667912265c;p=git.git diff --numstat: show binary with '-' to match "apply --numstat" This changes the --numstat output for binary files from "0 0" to "- -" to match what "apply --numstat" does. Signed-off-by: Junio C Hamano --- diff --git a/diff.c b/diff.c index 33153787b..d6d17f473 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);