summaryrefslogtreecommitdiffstats
path: root/reflog.c
diff options
context:
space:
mode:
Diffstat (limited to 'reflog.c')
-rw-r--r--reflog.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/reflog.c b/reflog.c
index 5ca944529b..eeccd5fab4 100644
--- a/reflog.c
+++ b/reflog.c
@@ -332,7 +332,8 @@ void reflog_expiry_prepare(const char *refname,
if (!cb->cmd.expire_unreachable || is_head(refname)) {
cb->unreachable_expire_kind = UE_HEAD;
} else {
- commit = lookup_commit(the_repository, oid);
+ commit = lookup_commit_reference_gently(the_repository,
+ oid, 1);
if (commit && is_null_oid(&commit->object.oid))
commit = NULL;
cb->unreachable_expire_kind = commit ? UE_NORMAL : UE_ALWAYS;