Skip to content

Commit 20c8cde

Browse files
committed
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 <[email protected]>
1 parent 82dfc2c commit 20c8cde

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

diff.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1701,9 +1701,8 @@ static void show_shortstats(struct diffstat_t *data, struct diff_options *option
17011701
int added = data->files[i]->added;
17021702
int deleted= data->files[i]->deleted;
17031703

1704-
if (data->files[i]->is_unmerged)
1705-
continue;
1706-
if (!data->files[i]->is_interesting && (added + deleted == 0)) {
1704+
if (data->files[i]->is_unmerged ||
1705+
(!data->files[i]->is_interesting && (added + deleted == 0))) {
17071706
total_files--;
17081707
} else if (!data->files[i]->is_binary) { /* don't count bytes */
17091708
adds += added;

0 commit comments

Comments
 (0)