X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;ds=sidebyside;f=fsmonitor.h;h=739318ab6d1060e3f5ef9eba0ab93aa560c1d246;hb=3e06e74e4cc221d0b602622a5a8d472cfa3efa2d;hp=8489fa3244976bb3e489c030e726cf06f0e4e9b3;hpb=7a188da354b0dd2525d8534a50e7684efbcf7039;p=thirdparty%2Fgit.git diff --git a/fsmonitor.h b/fsmonitor.h index 8489fa3244..739318ab6d 100644 --- a/fsmonitor.h +++ b/fsmonitor.h @@ -49,9 +49,10 @@ void refresh_fsmonitor(struct index_state *istate); * called any time the cache entry has been updated to reflect the * current state of the file on disk. */ -static inline void mark_fsmonitor_valid(struct cache_entry *ce) +static inline void mark_fsmonitor_valid(struct index_state *istate, struct cache_entry *ce) { - if (core_fsmonitor) { + if (core_fsmonitor && !(ce->ce_flags & CE_FSMONITOR_VALID)) { + istate->cache_changed = 1; ce->ce_flags |= CE_FSMONITOR_VALID; trace_printf_key(&trace_fsmonitor, "mark_fsmonitor_clean '%s'", ce->name); }