aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/reflog.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin/reflog.c')
-rw-r--r--builtin/reflog.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/builtin/reflog.c b/builtin/reflog.c
index f2bc1dc34f..c8f6b93d60 100644
--- a/builtin/reflog.c
+++ b/builtin/reflog.c
@@ -213,7 +213,7 @@ static int cmd_reflog_expire(int argc, const char **argv, const char *prefix,
OPT_END()
};
- git_config(reflog_expire_config, &opts);
+ repo_config(the_repository, reflog_expire_config, &opts);
save_commit_buffer = 0;
do_all = status = 0;
@@ -294,6 +294,9 @@ static int cmd_reflog_expire(int argc, const char **argv, const char *prefix,
&cb);
free(ref);
}
+
+ reflog_clear_expire_config(&opts);
+
return status;
}
@@ -426,13 +429,13 @@ static int cmd_reflog_write(int argc, const char **argv, const char *prefix,
ret = get_oid_hex_algop(argv[1], &old_oid, repo->hash_algo);
if (ret)
die(_("invalid old object ID: '%s'"), argv[1]);
- if (!is_null_oid(&old_oid) && !has_object(the_repository, &old_oid, 0))
+ if (!is_null_oid(&old_oid) && !odb_has_object(repo->objects, &old_oid, 0))
die(_("old object '%s' does not exist"), argv[1]);
ret = get_oid_hex_algop(argv[2], &new_oid, repo->hash_algo);
if (ret)
die(_("invalid new object ID: '%s'"), argv[2]);
- if (!is_null_oid(&new_oid) && !has_object(the_repository, &new_oid, 0))
+ if (!is_null_oid(&new_oid) && !odb_has_object(repo->objects, &new_oid, 0))
die(_("new object '%s' does not exist"), argv[2]);
message = argv[3];