directory-rename-detection.txt: technical docs on abilities and limitations
[gitweb.git] / builtin / gc.c
index c4777b2449e331336bac0baea317adb7c387eefb..ccfb1ceaeb3eb9c6a8cbe9297bceac94fa54bcac 100644 (file)
@@ -373,7 +373,7 @@ static int need_to_gc(void)
 /* return NULL on success, else hostname running the gc */
 static const char *lock_repo_for_gc(int force, pid_t* ret_pid)
 {
-       static struct lock_file lock;
+       struct lock_file lock = LOCK_INIT;
        char my_host[HOST_NAME_MAX + 1];
        struct strbuf sb = STRBUF_INIT;
        struct stat st;