From: Junio C Hamano Date: Sun, 4 Jun 2006 07:10:48 +0000 (-0700) Subject: Fix earlier mismerges. X-Git-Tag: v1.4.1-rc1~38 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=b266b123cd3124497a1d006cb126033ce458a85c;p=git.git Fix earlier mismerges. Signed-off-by: Junio C Hamano --- diff --git a/builtin-read-tree.c b/builtin-read-tree.c index cc61c2d81..7164b4905 100644 --- a/builtin-read-tree.c +++ b/builtin-read-tree.c @@ -799,10 +799,8 @@ static int oneway_merge(struct cache_entry **src) return error("Cannot do a oneway merge of %d trees", merge_size); - if (!a) { - invalidate_ce_path(old); + if (!a) return deleted_entry(old, old); - } if (old && same(old, a)) { if (reset) { struct stat st; @@ -1034,7 +1032,7 @@ int cmd_read_tree(int argc, const char **argv, char **envp) * valid cache-tree because the index must match exactly * what came from the tree. */ - if (trees && trees->item && (!merge || (stage == 2))) { + if (trees && trees->item && !prefix && (!merge || (stage == 2))) { cache_tree_free(&active_cache_tree); prime_cache_tree(); }