Skip to content

Commit 32f54ca

Browse files
pcloudsgitster
authored andcommitted
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>
1 parent c28b3d6 commit 32f54ca

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

unpack-trees.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -680,6 +680,8 @@ static int merged_entry(struct cache_entry *merge, struct cache_entry *old,
680680
} else {
681681
if (verify_uptodate(old, o))
682682
return -1;
683+
if (ce_skip_worktree(old))
684+
update |= CE_SKIP_WORKTREE;
683685
invalidate_ce_path(old, o);
684686
}
685687
}

0 commit comments

Comments
 (0)