summaryrefslogtreecommitdiff
path: root/builtin-read-tree.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-02-21 19:33:56 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-02-21 19:45:22 (GMT)
commitf5ed3b30e0091421408a0119fa75148955c4fc6a (patch)
treefe773298208212fefd640a5df44b51287cbdee41 /builtin-read-tree.c
parent2cd5dfd240ecb63c77bcb2532664984e3b69ae47 (diff)
downloadgit-f5ed3b30e0091421408a0119fa75148955c4fc6a.zip
git-f5ed3b30e0091421408a0119fa75148955c4fc6a.tar.gz
git-f5ed3b30e0091421408a0119fa75148955c4fc6a.tar.bz2
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 <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-read-tree.c')
-rw-r--r--builtin-read-tree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-read-tree.c b/builtin-read-tree.c
index 5785401..726fb0b 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;
}