Fix refs.c;:repack_without_ref() clean-up path
[gitweb.git] / builtin-pack-refs.c
index 246dd6372ea9eafbd8326662f053ed547631ab20..4093973a0517b02dbdffc3a742605d38b2134e85 100644 (file)
@@ -53,10 +53,10 @@ static int handle_one_ref(const char *path, const unsigned char *sha1,
 /* make sure nobody touched the ref, and unlink */
 static void prune_ref(struct ref_to_prune *r)
 {
-       struct ref_lock *lock = lock_ref_sha1(r->name + 5, r->sha1, 1);
+       struct ref_lock *lock = lock_ref_sha1(r->name + 5, r->sha1);
 
        if (lock) {
-               unlink(git_path(r->name));
+               unlink(git_path("%s", r->name));
                unlock_ref(lock);
        }
 }