Re: comparing file contents in is_exact_match?
- From
Martin Waitz <tali@admingilde.org>
- Date
- Jul 6, 2006, 07:16 UTC
- Message-ID
- <20060706071629.GB12512@admingilde.org>
- In-Reply-To
- <7vd5cj9rvm.fsf@assigned-by-dhcp.cox.net>
hoi :)
On Wed, Jul 05, 2006 at 11:20:13PM -0700, Junio C Hamano wrote:
Show 6 quoted lines
> Martin Waitz <tali@admingilde.org> writes: > > 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).
so perhaps we need three phases instead of two: first sort out all renames that can be detected by the sha1, then compare file contents and finally do the diff.
> git-update-index --refresh before doing anything might help.
At the moment it is doing (N-1)^2 content compares, even if the index is in sync.
-- Martin Waitz