packaging: Add contrib installation
[platform/upstream/git.git] / fsmonitor.h
index 8489fa3..739318a 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);
        }