summaryrefslogtreecommitdiff
path: root/update-index.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-02-09 08:55:17 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-02-09 08:55:17 (GMT)
commitb92b2ce94e5673ab3a2fbc9c762b39aaf7d72de5 (patch)
tree19c9636198b53b5795dc54dbbd674ba52fac2e8a /update-index.c
parent2bcab24080dc97fc628e1b601a195a9a96773fac (diff)
downloadgit-b92b2ce94e5673ab3a2fbc9c762b39aaf7d72de5.zip
git-b92b2ce94e5673ab3a2fbc9c762b39aaf7d72de5.tar.gz
git-b92b2ce94e5673ab3a2fbc9c762b39aaf7d72de5.tar.bz2
"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 <junkio@cox.net>
Diffstat (limited to 'update-index.c')
-rw-r--r--update-index.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/update-index.c b/update-index.c
index bb73050..ce1db38 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);