Merge branch 'ds/commit-graph-fsck' into jt/commit-graph-per-object-store
[gitweb.git] / builtin / difftool.c
index c439b6420788c42f6cae248a97b642e698fd88dc..51f6c9cdb460f5d35dc1abc199604ac5fa912dda 100644 (file)
@@ -20,6 +20,7 @@
 #include "argv-array.h"
 #include "strbuf.h"
 #include "lockfile.h"
+#include "object-store.h"
 #include "dir.h"
 
 static char *diff_gui_tool;
@@ -610,7 +611,7 @@ static int run_dir_diff(const char *extcmd, int symlinks, const char *prefix,
                        continue;
 
                if (!indices_loaded) {
-                       static struct lock_file lock;
+                       struct lock_file lock = LOCK_INIT;
                        strbuf_reset(&buf);
                        strbuf_addf(&buf, "%s/wtindex", tmpdir);
                        if (hold_lock_file_for_update(&lock, buf.buf, 0) < 0 ||