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>
Linus Torvalds committed
May 14, 2006 at 10:43 UTC
76b99b81613abea4cc16e45e1b11dbbec82a4b4d
1 file changed
+1
-1
read-tree.c
+1
-1
@@ -684,7 +684,7 @@ static int oneway_merge(struct cache_entry **src)
684
merge_size);
685
686
if (!a)
687
- return 0;
687
+ return deleted_entry(old, NULL);
688
if (old && same(old, a)) {
689
return keep_entry(old);
690
}