aboutsummaryrefslogtreecommitdiffstats
path: root/reflog.c
diff options
context:
space:
mode:
Diffstat (limited to 'reflog.c')
-rw-r--r--reflog.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/reflog.c b/reflog.c
index 333fd8708f..47ba8620c5 100644
--- a/reflog.c
+++ b/reflog.c
@@ -334,6 +334,8 @@ void reflog_expiry_prepare(const char *refname,
cb->unreachable_expire_kind = UE_HEAD;
} else {
commit = lookup_commit(the_repository, oid);
+ if (commit && is_null_oid(&commit->object.oid))
+ commit = NULL;
cb->unreachable_expire_kind = commit ? UE_NORMAL : UE_ALWAYS;
}