Skip to content

Commit 1142038

Browse files
author
Junio C Hamano
committed
read-tree --aggressive: remove deleted entry from the working tree.
When both heads deleted, or our side deleted while the other side did not touch, we did not have to update the working tree. However, we forgot to remove existing working tree file when we did not touch and the other side did. Signed-off-by: Junio C Hamano <junkio@cox.net>
1 parent e1a0c8b commit 1142038

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

read-tree.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -560,9 +560,11 @@ static int threeway_merge(struct cache_entry **stages)
560560
*/
561561
if ((head_deleted && remote_deleted) ||
562562
(head_deleted && remote && remote_match) ||
563-
(remote_deleted && head && head_match))
563+
(remote_deleted && head && head_match)) {
564+
if (index)
565+
return deleted_entry(index, index);
564566
return 0;
565-
567+
}
566568
/*
567569
* Added in both, identically.
568570
*/

0 commit comments

Comments
 (0)