]> git.ipfire.org Git - thirdparty/git.git/blobdiff - fsmonitor.c
Merge branch 'cb/fsmonitor-intfix'
[thirdparty/git.git] / fsmonitor.c
index df55d9dc2293615361b12b1e41219a479c1f073e..231e83a94db58e4efb2f4d7a1dbe90220bd2f317 100644 (file)
@@ -129,7 +129,6 @@ static void fsmonitor_refresh_callback(struct index_state *istate, const char *n
 
 void refresh_fsmonitor(struct index_state *istate)
 {
-       static int has_run_once = 0;
        struct strbuf query_result = STRBUF_INIT;
        int query_success = 0;
        size_t bol; /* beginning of line */
@@ -137,9 +136,9 @@ void refresh_fsmonitor(struct index_state *istate)
        char *buf;
        unsigned int i;
 
-       if (!core_fsmonitor || has_run_once)
+       if (!core_fsmonitor || istate->fsmonitor_has_run_once)
                return;
-       has_run_once = 1;
+       istate->fsmonitor_has_run_once = 1;
 
        trace_printf_key(&trace_fsmonitor, "refresh fsmonitor");
        /*