fetch: refactor to make function args narrower
[gitweb.git] / rerere.c
index 18cae2d11c9a86aae0ed352a8f7606b142c5c183..e0862e27786244b1a98723d09475223cc001dd62 100644 (file)
--- a/rerere.c
+++ b/rerere.c
@@ -703,10 +703,9 @@ static int merge(const struct rerere_id *id, const char *path)
        return ret;
 }
 
-static struct lock_file index_lock;
-
 static void update_paths(struct string_list *update)
 {
+       struct lock_file index_lock = LOCK_INIT;
        int i;
 
        hold_locked_index(&index_lock, LOCK_DIE_ON_ERROR);