reflog: avoid constructing .lock path with git_path
[gitweb.git] / builtin / reflog.c
index b6388f75b0cffcce03b9eee03be966ce67806310..fb07c667a87b19a74a5ef0104a1b3cac1e92f7a8 100644 (file)
@@ -372,7 +372,7 @@ static int expire_reflog(const char *ref, const unsigned char *sha1, int unused,
        if (!reflog_exists(ref))
                goto finish;
        if (!cmd->dry_run) {
-               newlog_path = git_pathdup("logs/%s.lock", ref);
+               newlog_path = mkpathdup("%s.lock", log_file);
                cb.newlog = fopen(newlog_path, "w");
        }
 
@@ -649,7 +649,7 @@ static int cmd_reflog_expire(int argc, const char **argv, const char *prefix)
                init_revisions(&cb.revs, prefix);
                if (cb.verbose)
                        printf("Marking reachable objects...");
-               mark_reachable_objects(&cb.revs, 0, NULL);
+               mark_reachable_objects(&cb.revs, 0, 0, NULL);
                if (cb.verbose)
                        putchar('\n');
        }