@matheusbsbs / matheus-bagliano / commits / b92b2ce94e
Fork 0

"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>

Junio C Hamano committed Feb 9, 2006 at 00:55 UTC b92b2ce94e5673ab3a2fbc9c762b39aaf7d72de5
1 file changed +7 -2
update-index.c
+7 -2
@@ -161,8 +161,13 @@ static struct cache_entry *refresh_entry(struct cache_entry *ce, int really)
161 return ERR_PTR(-errno);
162
163 changed = ce_match_stat(ce, &st, really);
164 - if (!changed)
165 - return NULL;
164 + if (!changed) {
165 + if (really && assume_unchanged &&
166 + !(ce->ce_flags & htons(CE_VALID)))
167 + ; /* mark this one VALID again */
168 + else
169 + return NULL;
170 + }
171
172 if (ce_modified(ce, &st, really))
173 return ERR_PTR(-EINVAL);