summaryrefslogtreecommitdiff
path: root/path-list.h
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2008-01-22 21:24:21 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2008-01-22 21:24:21 -0800
commit077c48df8a72b046a2f562fedffa1c3d3a73a4e2 (patch)
tree54914c723ef13d9c15d1726e2a9e0589d5d5ad46 /path-list.h
parentAlso use unpack_trees() in do_diff_cache() (diff)
downloadtgif-077c48df8a72b046a2f562fedffa1c3d3a73a4e2.tar.xz
read-cache.c: fix a couple more CE_REMOVE conversion
It is a D/F conflict if you want to add "foo/bar" to the index when "foo" already exists. Also it is a conflict if you want to add a file "foo" when "foo/bar" exists. An exception is when the existing entry is there only to mark "I used to be here but I am being removed". This is needed for operations such as "git read-tree -m -u" that update the index and then reflect the result to the work tree --- we need to remember what to remove somewhere, and we use the index for that. In such a case, an existing file "foo" is being removed and we can create "foo/" directory and hang "bar" underneath it without any conflict. We used to use (ce->ce_mode == 0) to mark an entry that is being removed, but (CE_REMOVE & ce->ce_flags) is used for that purpose these days. An earlier commit forgot to convert the logic in the code that checks D/F conflict condition. The old code knew that "to be removed" entries cannot be at higher stage and actively checked that condition, but it was an unnecessary check. This patch removes the extra check as well. Acked-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'path-list.h')
0 files changed, 0 insertions, 0 deletions