Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
diff --shortstat: do not count "unmerged" entries
author
Junio C Hamano
<gitster@pobox.com>
Tue, 27 Nov 2012 22:19:36 +0000
(14:19 -0800)
committer
Junio C Hamano
<gitster@pobox.com>
Tue, 27 Nov 2012 22:19:36 +0000
(14:19 -0800)
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>
diff.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
82dfc2c
)
diff --git
a/diff.c
b/diff.c
index 26ede82a7b3a2c3d6153f1f721fc2cfa1aac4371..374b2354f3eb51e7055eb2014cc84661aac13e14 100644
(file)
--- a/
diff.c
+++ b/
diff.c
@@
-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;