From: Junio C Hamano Date: Fri, 08 Apr 2011 19:56:50 GMT Subject: Re: BUG? in --dirstat when rearranging lines in a file Message-ID: <7vtye834al.fsf@alter.siamese.dyndns.org> In-Reply-To: Linus Torvalds writes: > On Fri, Apr 8, 2011 at 7:46 AM, Johan Herland wrote: >> >> #2: Improve --dirstat-by-file. It doesn't really care about the per-file >> analysis done by --dirstat, but only whether or not a file has changed >> at all. Since the diff queue does not contain unchanged files (<- this >> is an assumption that I hope someone with more diffcore knowledge can >> verify), > > Hmm. > > I think that with renames, the diff queue _can_ contain unchanged > files (ie pure renames). > > Also, I think -CC (aka --find-copies-harder), _every_ file ends up in > the diff queue because that's how it does the detection. Both are correct, but the output phase happens after diffcore_std() cleans up the unused and unchanged filepairs thrown into the queue for the purpose of find-copies-harder, so you shouldn't have to worry about them. When you rename a file without changing its contents, what do you want to see in --dirstat-by-file output? I assume that you do not want to show anything, so it would be sufficient to compare the two object names.