entry.c: update cache_changed if refresh_cache is set in checkout_entry()

Other fill_stat_cache_info() is on new entries, which should set
CE_ENTRY_ADDED in cache_changed, so we're safe.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Nguyễn Thái Ngọc Duy
2014-06-13 19:19:34 +07:00
committed by Junio C Hamano
parent e6c286e8b2
commit d4a2024aef
6 changed files with 11 additions and 3 deletions

View File

@ -210,9 +210,11 @@ static int write_entry(struct cache_entry *ce,
finish:
if (state->refresh_cache) {
assert(state->istate);
if (!fstat_done)
lstat(ce->name, &st);
fill_stat_cache_info(ce, &st);
state->istate->cache_changed |= CE_ENTRY_CHANGED;
}
return 0;
}