@matheusbsbs / matheus-bagliano / commits / 32f54ca317
Fork 0

unpack-trees(): carry skip-worktree bit over in merged_entry()

In this code path, we would remove "old" and replace it with "merge". "old" may have skip-worktree bit, so re-add it to "merge". Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Nguyễn Thái Ngọc Duy committed Aug 20, 2009 at 20:47 UTC 32f54ca31747c47f56abb7ae87a6da0f5b8d97c3
1 file changed +2
unpack-trees.c
+2
@@ -680,6 +680,8 @@ static int merged_entry(struct cache_entry *merge, struct cache_entry *old,
680 } else {
681 if (verify_uptodate(old, o))
682 return -1;
683 + if (ce_skip_worktree(old))
684 + update |= CE_SKIP_WORKTREE;
685 invalidate_ce_path(old, o);
686 }
687 }