diff: Only count lines in show_shortstats
Do not mix byte and line counts. Binary files have byte counts;
skip them when accumulating line insertions/deletions.
The regression was introduced in e18872b
.
Signed-off-by: Alexander Strasser <eclipse7@gmx.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
e18872b2f0
commit
de9658b511
2
diff.c
2
diff.c
@ -1668,7 +1668,7 @@ static void show_shortstats(struct diffstat_t *data, struct diff_options *option
|
||||
continue;
|
||||
if (!data->files[i]->is_renamed && (added + deleted == 0)) {
|
||||
total_files--;
|
||||
} else {
|
||||
} else if (!data->files[i]->is_binary) { /* don't count bytes */
|
||||
adds += added;
|
||||
dels += deleted;
|
||||
}
|
||||
|
Reference in New Issue
Block a user