diff.c: rewrite emit_line_0 more understandably
[gitweb.git] / rerere.c
index a3af88939a211d67ba48a3a11974af1b0c1063b4..16c8aac6211ac74de77b1f2cad5eddb4d1abcc95 100644 (file)
--- a/rerere.c
+++ b/rerere.c
@@ -704,10 +704,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);