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

Re: [PATCH v2] diff-lib.c: adjust position of i-t-a entries in diff

From: Junio C Hamano <hidden>
Date: 2016-06-15 23:04:12

Junio C Hamano [off-list ref] writes:
Ah, wait.

I suspect that it all cancels out.
...
Now, as you mentioned, there _may_ be codepaths that uses the same
definition of "what's in the index" as what diff-cache used to take
before your patches, and they may be broken by removing the
invalidation.  If we find such codepaths, we should treat their old
behaviour as buggy and fix them, instead of reintroducing the
invalidation and keep their current behaviour, as the new world
order is "i-t-a entries in the index does not yet exist."
One potential negative consequence of the new world order I can
immediately think of is this.  In many operations, we try to be
lenient to changes in the working tree as long as the index is
clean.  "read-tree -m" is the most visible one, where we require
that the index and HEAD matches while allowing changes to working
tree paths as long as they do not interfere with the paths that are
involved in the merge.  We need to make sure that the path dir/bar
added by "add -N dir/bar", which in the new world order does not
count as "index is not clean and there is a difference from HEAD",
(1) does not interfere with the mergy operation that wants to touch
dir (which _could_ even be expected to be a file) or dir/bar, and
(2) is not lost because the mergy operation wants to touch dir or
dir/bar, for example.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help