path: root/entry.c
diff options
authorNguyễn Thái Ngọc Duy <>2009-12-14 11:43:58 (GMT)
committerJunio C Hamano <>2009-12-14 22:03:58 (GMT)
commit56cac48c3550de88d71b3944576d44337261d71b (patch)
tree80e3e42d8daeb595948c554f754aa6e6ccfaeebe /entry.c
parentbbbe508d771f6a4c65fea43343597ecfa1eb540e (diff)
ie_match_stat(): do not ignore skip-worktree bit with CE_MATCH_IGNORE_VALID
Previously CE_MATCH_IGNORE_VALID flag is used by both valid and skip-worktree bits. While the two bits have similar behaviour, sharing this flag means "git update-index --really-refresh" will ignore skip-worktree while it should not. Instead another flag is introduced to ignore skip-worktree bit, CE_MATCH_IGNORE_VALID only applies to valid bit. Signed-off-by: Nguyễn Thái Ngọc Duy <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'entry.c')
1 files changed, 1 insertions, 1 deletions
diff --git a/entry.c b/entry.c
index f276cf3..efee21f 100644
--- a/entry.c
+++ b/entry.c
@@ -202,7 +202,7 @@ int checkout_entry(struct cache_entry *ce, const struct checkout *state, char *t
len += ce_namelen(ce);
if (!check_path(path, len, &st)) {
- unsigned changed = ce_match_stat(ce, &st, CE_MATCH_IGNORE_VALID);
+ unsigned changed = ce_match_stat(ce, &st, CE_MATCH_IGNORE_VALID|CE_MATCH_IGNORE_SKIP_WORKTREE);
if (!changed)
return 0;
if (!state->force) {