aboutsummaryrefslogtreecommitdiffstats
path: root/reflog.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-03-23 14:09:30 -0700
committerJunio C Hamano <gitster@pobox.com>2022-03-23 14:09:30 -0700
commit7f7d1ad3e0b12a0c826d4a0ffbedce28d9be86c6 (patch)
tree820769930ccccb55e404f98f454fa5b2fb59171a /reflog.c
parentd674bf5570b2eed9779a0b8879ae70219f27a2f9 (diff)
parent57be9c6deeb1be7c3ce6270df52473eddc09a86c (diff)
downloadgit-7f7d1ad3e0b12a0c826d4a0ffbedce28d9be86c6.tar.gz
Merge branch 'ab/reflog-prep-fix'
Regression fix. * ab/reflog-prep-fix: reflog: don't be noisy on empty reflogs
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;
}