X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin-reflog.c;h=da96da317be01c24ae9711206976f48f33e39f97;hb=bf474e2402e51843e8230c064da6ccfdf3a8ff54;hp=0c34e378199064e87aa09caf0fa0a2346333ec69;hpb=93310a40eb022a0e36e7c618921931d8ffc31fd1;p=git.git diff --git a/builtin-reflog.c b/builtin-reflog.c index 0c34e3781..da96da317 100644 --- a/builtin-reflog.c +++ b/builtin-reflog.c @@ -277,11 +277,11 @@ static int expire_reflog(const char *ref, const unsigned char *sha1, int unused, lock = lock_any_ref_for_update(ref, sha1, 0); if (!lock) return error("cannot lock ref '%s'", ref); - log_file = xstrdup(git_path("logs/%s", ref)); + log_file = git_pathdup("logs/%s", ref); if (!file_exists(log_file)) goto finish; if (!cmd->dry_run) { - newlog_path = xstrdup(git_path("logs/%s.lock", ref)); + newlog_path = git_pathdup("logs/%s.lock", ref); cb.newlog = fopen(newlog_path, "w"); } @@ -604,8 +604,8 @@ static int cmd_reflog_delete(int argc, const char **argv, const char *prefix) continue; } - if (!dwim_ref(argv[i], spec - argv[i], sha1, &ref)) { - status |= error("%s points nowhere!", argv[i]); + if (!dwim_log(argv[i], spec - argv[i], sha1, &ref)) { + status |= error("no reflog for '%s'", argv[i]); continue; }