summaryrefslogtreecommitdiffstats
path: root/t/t1410-reflog.sh
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 /t/t1410-reflog.sh
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 't/t1410-reflog.sh')
-rwxr-xr-xt/t1410-reflog.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/t/t1410-reflog.sh b/t/t1410-reflog.sh
index 5bf883f1e3..246a3f46ab 100755
--- a/t/t1410-reflog.sh
+++ b/t/t1410-reflog.sh
@@ -146,6 +146,14 @@ test_expect_success rewind '
test_line_count = 5 output
'
+test_expect_success 'reflog expire should not barf on an annotated tag' '
+ test_when_finished "git tag -d v0.tag || :" &&
+ git -c core.logAllRefUpdates=always \
+ tag -a -m "tag name" v0.tag main &&
+ git reflog expire --dry-run refs/tags/v0.tag 2>err &&
+ test_grep ! "error: [Oo]bject .* not a commit" err
+'
+
test_expect_success 'corrupt and check' '
corrupt $F &&