summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@osdl.org>2006-05-14 17:43:50 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-05-14 23:48:23 (GMT)
commit76b99b81613abea4cc16e45e1b11dbbec82a4b4d (patch)
tree71e223857537c34fc72f8ddeb26470f0ae2640d3
parent975bf9cf5ad5d440f98f464ae8124609a4835ce1 (diff)
downloadgit-76b99b81613abea4cc16e45e1b11dbbec82a4b4d.zip
git-76b99b81613abea4cc16e45e1b11dbbec82a4b4d.tar.gz
git-76b99b81613abea4cc16e45e1b11dbbec82a4b4d.tar.bz2
Allow one-way tree merge to remove old files
For some random reason (probably just because nobody noticed), the one-way merge strategy didn't mark deleted files as deleted, so if you used git-read-tree -m -u <newtree> it would update the files that got changed in the index, but it would not delete the files that got deleted. This should fix it, and I can't imagine that anybody depends on the old strange "update only existing files" behaviour. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
-rw-r--r--read-tree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/read-tree.c b/read-tree.c
index e926e4c..11157f4 100644
--- a/read-tree.c
+++ b/read-tree.c
@@ -684,7 +684,7 @@ static int oneway_merge(struct cache_entry **src)
merge_size);
if (!a)
- return 0;
+ return deleted_entry(old, NULL);
if (old && same(old, a)) {
return keep_entry(old);
}