Skip to content

Commit

Permalink
unpack-trees(): carry skip-worktree bit over in merged_entry()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Nguyễn Thái Ngọc Duy authored and Junio C Hamano committed Aug 24, 2009
1 parent c28b3d6 commit 32f54ca
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions unpack-trees.c
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,8 @@ static int merged_entry(struct cache_entry *merge, struct cache_entry *old,
} else {
if (verify_uptodate(old, o))
return -1;
if (ce_skip_worktree(old))
update |= CE_SKIP_WORKTREE;
invalidate_ce_path(old, o);
}
}
Expand Down

0 comments on commit 32f54ca

Please sign in to comment.