diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-11-27 14:19:36 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-11-27 14:19:36 -0800 |
commit | 20c8cde45656fc187e06088ef5baf0bbdfdf70bd (patch) | |
tree | a9cb9f370e9b7bcecc124fa73c8a1b7d30c25c8e /diff.c | |
parent | 82dfc2c44ecda8a7afe417086c704b141a11cd58 (diff) | |
download | git-20c8cde45656fc187e06088ef5baf0bbdfdf70bd.tar.gz git-20c8cde45656fc187e06088ef5baf0bbdfdf70bd.tar.xz |
diff --shortstat: do not count "unmerged" entries
Fix the same issue as the previous one for "git diff --stat";
unmerged entries was doubly-counted.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff.c')
-rw-r--r-- | diff.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -1701,9 +1701,8 @@ static void show_shortstats(struct diffstat_t *data, struct diff_options *option int added = data->files[i]->added; int deleted= data->files[i]->deleted; - if (data->files[i]->is_unmerged) - continue; - if (!data->files[i]->is_interesting && (added + deleted == 0)) { + if (data->files[i]->is_unmerged || + (!data->files[i]->is_interesting && (added + deleted == 0))) { total_files--; } else if (!data->files[i]->is_binary) { /* don't count bytes */ adds += added; |