summaryrefslogtreecommitdiff
path: root/fsmonitor.h
diff options
context:
space:
mode:
Diffstat (limited to 'fsmonitor.h')
-rw-r--r--fsmonitor.h5
1 files changed, 3 insertions, 2 deletions
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);
}