Re: comparing file contents in is_exact_match?
- From
Junio C Hamano <junkio@cox.net>
- Date
- Jul 6, 2006, 06:20 UTC
- Message-ID
- <7vd5cj9rvm.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <20060706055729.GA12512@admingilde.org>
Martin Waitz <tali@admingilde.org> writes:
Show 11 quoted lines
> The reason for that is that is_exact_match (in diffcore-rename.c) maps > both the source and destination file into memory and then compares them > byte for byte. This is a little bit too much for my little machine. > > When I remove the content comparation and only leave the sha1 > comparision, then my renames are correctly found in a second. But > unluckily, some other renames in the testcases are not correctly > handled any more. > > So is there an easy solution? Why is the content comparision in > is_exact_match needed?
Because your working tree can be out of sync with respect to what's in the index, in which case we cannot trust the sha1 while running diff-index (without --cached flag).
git-update-index --refresh before doing anything might help.