Re: [PATCH] disable grafts during fetch/push/bundle
- From
Jeff King <peff@peff.net>
- Date
- Mar 6, 2014, 19:07 UTC
- Message-ID
- <20140306190757.GA27583@sigill.intra.peff.net>
- In-Reply-To
- <xmqqbnxjywxz.fsf@gitster.dls.corp.google.com>
On Thu, Mar 06, 2014 at 11:00:08AM -0800, Junio C Hamano wrote:
Show 14 quoted lines
> Jeff King <peff@peff.net> writes: > > > I also noticed that the diff engine does not play well with replacements > > of blobs. When we are diffing the trees, we see that the sha1 for path > > "foo" is the same on either side, and do not look further, even though > > feeding those sha1s to builtin_diff would fetch the replacements. > > Sorry, I do not quite understand. > > In "git diff A B -- path", if the object name recorded for A:path > and B:path are the same, but the replacement mechanism maps the > object name for that blob object to some other blob object, wouldn't > the result be empty because both sides replace to the same thing > anyway?
Oh, right, I was being stupid. I did:
git replace --edit HEAD:some-file
and expected "git show" to find the diff. But that doesn't make sense. On top of that, I need to do:
git replace --edit HEAD^{tree}to replace the sha1 of the entry in the tree. In which case diff would find it just fine.
-Peff