X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=update-index.c;h=ce1db38d16928d8b5085cb6e177f40fff9a978cf;hb=621603b76afe00471613ce92b78376fc57f21234;hp=bb730509b871381ffbd8457bd38ce940d78ba50d;hpb=8b9b0f3af73233595b6b1103ffb30242508a5e47;p=git.git diff --git a/update-index.c b/update-index.c index bb730509b..ce1db38d1 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);