Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15

Re: [PATCH] disable grafts during fetch/push/bundle

From: Jeff King <hidden>
Date: 2016-06-15 23:00:13

On Thu, Mar 06, 2014 at 11:00:08AM -0800, Junio C Hamano wrote:
Jeff King [off-list ref] writes:
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help