Merge branch 'jk/no-system-includes-in-dot-c' into maint
[gitweb.git] / fsmonitor.h
index 8489fa3244976bb3e489c030e726cf06f0e4e9b3..739318ab6d1060e3f5ef9eba0ab93aa560c1d246 100644 (file)
@@ -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);
        }