From 56cac48c3550de88d71b3944576d44337261d71b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= Date: Mon, 14 Dec 2009 18:43:58 +0700 Subject: ie_match_stat(): do not ignore skip-worktree bit with CE_MATCH_IGNORE_VALID MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- entry.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'entry.c') diff --git a/entry.c b/entry.c index f276cf3b88..efee21fe19 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) { -- cgit v1.2.1