提交 20c8cde4 编写于 作者: J Junio C Hamano

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: NJunio C Hamano <gitster@pobox.com>
上级 82dfc2c4
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册