From f5ed3b30e0091421408a0119fa75148955c4fc6a Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Thu, 21 Feb 2008 11:33:56 -0800 Subject: git-reset --hard and git-read-tree --reset: fix read_cache_unmerged() When invalidating unmerged entries in the index, we used to set their ce_mode to 0 to note the fact that they do not matter anymore which also made sure that later unpack_trees() call would not reuse them. Instead just remove them from the index. Acked-by: Linus Torvalds Signed-off-by: Junio C Hamano --- builtin-read-tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'builtin-read-tree.c') diff --git a/builtin-read-tree.c b/builtin-read-tree.c index 5785401753..726fb0b588 100644 --- a/builtin-read-tree.c +++ b/builtin-read-tree.c @@ -45,7 +45,7 @@ static int read_cache_unmerged(void) continue; cache_tree_invalidate_path(active_cache_tree, ce->name); last = ce; - ce->ce_flags |= CE_REMOVE; + continue; } *dst++ = ce; } -- cgit v1.2.3