summaryrefslogtreecommitdiffstats
path: root/reflog.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-08-14 23:54:55 +0200
committerJunio C Hamano <gitster@pobox.com>2024-08-14 23:54:55 +0200
commit494c9788e40dab99492f10658852010f4a31d358 (patch)
treefae63c45af76f374c65668df9cd257573e555777 /reflog.c
parentMerge branch 'jr/ls-files-expand-literal-doc' (diff)
parentRevert "reflog expire: don't use lookup_commit_reference_gently()" (diff)
downloadgit-494c9788e40dab99492f10658852010f4a31d358.tar.xz
git-494c9788e40dab99492f10658852010f4a31d358.zip
Merge branch 'jc/reflog-expire-lookup-commit-fix'
"git reflog expire" failed to honor annotated tags when computing reachable commits. * jc/reflog-expire-lookup-commit-fix: Revert "reflog expire: don't use lookup_commit_reference_gently()"
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;