Re: [PATCHv2 2/3] --dirstat-by-file: Make it faster and more correct
Johan Herland <johan@herland.net> writes:
Show 10 quoted lines
> Currently, when using --dirstat-by-file, it first does the full --dirstat
> analysis (using diffcore_count_changes()), and then resets 'damage' to 1,
> if any damage was found by diffcore_count_changes().
>
> But --dirstat-by-file is not interested in the file damage per se. It only
> cares if the file changed at all. In that sense it only cares if the blob
> SHA1 for a file has changed. We therefore only need to compare the SHA1s
> of each file pair in the diff queue. As a result, we can skip the entire
> --dirstat analysis and simply set 'damage' to 1 for each entry where the
> SHA1 has changed.