diff options
author | Junio C Hamano <gitster@pobox.com> | 2024-08-14 23:54:55 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-08-14 23:54:55 +0200 |
commit | 494c9788e40dab99492f10658852010f4a31d358 (patch) | |
tree | fae63c45af76f374c65668df9cd257573e555777 /t/t1410-reflog.sh | |
parent | Merge branch 'jr/ls-files-expand-literal-doc' (diff) | |
parent | Revert "reflog expire: don't use lookup_commit_reference_gently()" (diff) | |
download | git-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-x | t/t1410-reflog.sh | 8 |
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 && |