summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2960a1d)
raw | patch | inline | side by side (parent: 2960a1d)
author | Junio C Hamano <junkio@cox.net> | |
Mon, 2 Apr 2007 23:29:56 +0000 (16:29 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Wed, 4 Apr 2007 07:19:29 +0000 (00:19 -0700) |
When switching from one tree to another, we should not send a
marker that says "this file does not exist in the new tree -- I
am a placeholder to tell you that, and not a real blob" down to
merged_entry() as the result of the merge.
marker that says "this file does not exist in the new tree -- I
am a placeholder to tell you that, and not a real blob" down to
merged_entry() as the result of the merge.
unpack-trees.c | patch | blob | history |
diff --git a/unpack-trees.c b/unpack-trees.c
index 4cf83bd90a0d005f481752ef00db76668587bb50..d0367846d4d1d86a16c4c9d20dadb68fa35a94d9 100644 (file)
--- a/unpack-trees.c
+++ b/unpack-trees.c
struct unpack_trees_options *o)
{
struct cache_entry *current = src[0];
- struct cache_entry *oldtree = src[1], *newtree = src[2];
+ struct cache_entry *oldtree = src[1];
+ struct cache_entry *newtree = src[2];
if (o->merge_size != 2)
return error("Cannot do a twoway merge of %d trees",
o->merge_size);
+ if (oldtree == o->df_conflict_entry)
+ oldtree = NULL;
+ if (newtree == o->df_conflict_entry)
+ newtree = NULL;
+
if (current) {
if ((!oldtree && !newtree) || /* 4 and 5 */
(!oldtree && newtree &&
(oldtree && newtree &&
same(oldtree, newtree)) || /* 14 and 15 */
(oldtree && newtree &&
- !same(oldtree, newtree) && /* 18 and 19*/
+ !same(oldtree, newtree) && /* 18 and 19 */
same(current, newtree))) {
return keep_entry(current, o);
}