Skip to content

Commit

Permalink
"Assume unchanged" git: --really-refresh fix.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Junio C Hamano committed Feb 9, 2006
1 parent 2bcab24 commit b92b2ce
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions update-index.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit b92b2ce

Please sign in to comment.