We do not account binary nor unmerged files when --shortstat is
asked for (or the summary stat at the end of --stat).
The new option --dirstat should work the same way as it is about
summarizing the changes of multiple files by adding them up.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
this = gather_dirstat(dir, changed, f->name, newbaselen);
sources++;
} else {
- this = f->added + f->deleted;
+ if (f->is_unmerged || f->is_binary)
+ this = 0;
+ else
+ this = f->added + f->deleted;
dir->files++;
dir->nr--;
sources += 2;
/* Calculate total changes */
changed = 0;
for (i = 0; i < data->nr; i++) {
+ if (data->files[i]->is_binary || data->files[i]->is_unmerged)
+ continue;
changed += data->files[i]->added;
changed += data->files[i]->deleted;
}