зеркало из https://github.com/microsoft/git.git
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>
This commit is contained in:
Родитель
82dfc2c44e
Коммит
20c8cde456
5
diff.c
5
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 added = data->files[i]->added;
|
||||||
int deleted= data->files[i]->deleted;
|
int deleted= data->files[i]->deleted;
|
||||||
|
|
||||||
if (data->files[i]->is_unmerged)
|
if (data->files[i]->is_unmerged ||
|
||||||
continue;
|
(!data->files[i]->is_interesting && (added + deleted == 0))) {
|
||||||
if (!data->files[i]->is_interesting && (added + deleted == 0)) {
|
|
||||||
total_files--;
|
total_files--;
|
||||||
} else if (!data->files[i]->is_binary) { /* don't count bytes */
|
} else if (!data->files[i]->is_binary) { /* don't count bytes */
|
||||||
adds += added;
|
adds += added;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче