summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <junkio@cox.net>2006-05-03 16:07:02 -0700
committerLibravatar Junio C Hamano <junkio@cox.net>2006-05-03 16:07:02 -0700
commitc2b9ae43303342a33b2632939f319a3554f3a70c (patch)
treef3ed228833e699522984a61e7f4a11c56effe7d6
parentFix test-dump-cache-tree in one-tree disappeared case. (diff)
downloadtgif-c2b9ae43303342a33b2632939f319a3554f3a70c.tar.xz
read-tree: invalidate cache-tree entry when a new index entry is added.
When doing two-way merge, we failed to invalidate the directory that a new entry is added (we correctly did so for modified and deleted entries). Signed-off-by: Junio C Hamano <junkio@cox.net>
-rw-r--r--read-tree.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/read-tree.c b/read-tree.c
index 66c0120f13..067fb95e9d 100644
--- a/read-tree.c
+++ b/read-tree.c
@@ -446,6 +446,8 @@ static int merged_entry(struct cache_entry *merge, struct cache_entry *old)
invalidate_ce_path(old);
}
}
+ else
+ invalidate_ce_path(merge);
merge->ce_flags &= ~htons(CE_STAGEMASK);
add_cache_entry(merge, ADD_CACHE_OK_TO_ADD);
return 1;