Merge branch 'ab/get-short-oid'
[gitweb.git] / builtin / difftool.c
index aad0e073ee61648a73843ceddffbab6047c9721b..162806f2385c944a3708dd31f38a5d1e2010aa5a 100644 (file)
@@ -610,7 +610,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 ||