Re: [WIP PATCH] Manual rename correction
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 1, 2012, 22:10 UTC
- Message-ID
- <7vipd2e00g.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <20120801215414.GC16233@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 11 quoted lines
> On Tue, Jul 31, 2012 at 11:01:27PM -0700, Junio C Hamano wrote: > ... >> As we still have the pathname in this codepath, I am wondering if we >> would benefit from custom "content hash" that knows the nature of >> payload than the built-in similarity estimator, driven by the >> attribute mechanism (if the latter is the case, that is). > > Hmm. Interesting. But I don't think that attributes are a good fit here. > They are pathname based, so how do I apply anything related to > similarity of a particular version by pathname? IOW, how does it apply > in one tree but not another?
When you move porn/0001.jpg in the preimage to naughty/00001.jpg in the postimage, they both can hit "*.jpg contentid=jpeg" line in the top-level .gitattribute file, and the contentid driver for jpeg type may strip exif and hash the remainder bits in the image to come up with a token you can use in a similar way as object ID is used in the exact rename detection phase.
Just thinking aloud.