string-list: remove unused function print_string_list
[gitweb.git] / rerere.c
index ea24d4c2f47ab6495d97f38245dd420a1ad38391..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);
@@ -979,8 +978,8 @@ static int handle_cache(const char *path, unsigned char *sha1, const char *outpu
                        break;
                i = ce_stage(ce) - 1;
                if (!mmfile[i].ptr) {
-                       mmfile[i].ptr = read_sha1_file(ce->oid.hash, &type,
-                                                      &size);
+                       mmfile[i].ptr = read_object_file(&ce->oid, &type,
+                                                        &size);
                        mmfile[i].size = size;
                }
        }