From: Linus Torvalds Date: Sun, 14 May 2006 17:43:50 +0000 (-0700) Subject: Allow one-way tree merge to remove old files X-Git-Tag: v1.4.1-rc1~114^2~1 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=76b99b81613abea4cc16e45e1b11dbbec82a4b4d;p=git.git 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 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 Signed-off-by: Junio C Hamano --- diff --git a/read-tree.c b/read-tree.c index e926e4c88..11157f424 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); }