From: Junio C Hamano Date: Thu, 9 Feb 2006 08:55:17 +0000 (-0800) Subject: "Assume unchanged" git: --really-refresh fix. X-Git-Tag: v1.3.0-rc1~165^2~3 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=b92b2ce94e5673ab3a2fbc9c762b39aaf7d72de5;p=git.git "Assume unchanged" git: --really-refresh fix. The earlier round failed to make --really-refresh to mark up-to-date index entry to valid again due to a trivial thinko. Signed-off-by: Junio C Hamano --- diff --git a/update-index.c b/update-index.c index bb730509..ce1db38d 100644 --- a/update-index.c +++ b/update-index.c @@ -161,8 +161,13 @@ static struct cache_entry *refresh_entry(struct cache_entry *ce, int really) return ERR_PTR(-errno); changed = ce_match_stat(ce, &st, really); - if (!changed) - return NULL; + if (!changed) { + if (really && assume_unchanged && + !(ce->ce_flags & htons(CE_VALID))) + ; /* mark this one VALID again */ + else + return NULL; + } if (ce_modified(ce, &st, really)) return ERR_PTR(-EINVAL);