diff options
author | Junio C Hamano <gitster@pobox.com> | 2022-01-10 11:52:50 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-01-10 11:52:50 -0800 |
commit | b48c69c3c8a0e6e44f31c70677ac40658d8f3439 (patch) | |
tree | 7b3271c30434c7572b9956ed9942c22a872907f0 /t/t7004-tag.sh | |
parent | Merge branch 'jh/p4-remove-unused' (diff) | |
parent | t7004: use "test-tool ref-store" for reflog inspection (diff) | |
download | tgif-b48c69c3c8a0e6e44f31c70677ac40658d8f3439.tar.xz |
Merge branch 'hn/ref-api-tests-update'
Test updates.
* hn/ref-api-tests-update:
t7004: use "test-tool ref-store" for reflog inspection
t7004: create separate tags for different tests
t5550: require REFFILES
t5540: require REFFILES
Diffstat (limited to 't/t7004-tag.sh')
-rwxr-xr-x | t/t7004-tag.sh | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/t/t7004-tag.sh b/t/t7004-tag.sh index 25a26563dd..9aa1660651 100755 --- a/t/t7004-tag.sh +++ b/t/t7004-tag.sh @@ -94,10 +94,10 @@ test_expect_success 'creating a tag with --create-reflog should create reflog' ' git log -1 \ --format="format:tag: tagging %h (%s, %cd)%n" \ --date=format:%Y-%m-%d >expected && - test_when_finished "git tag -d tag_with_reflog" && - git tag --create-reflog tag_with_reflog && - git reflog exists refs/tags/tag_with_reflog && - sed -e "s/^.* //" .git/logs/refs/tags/tag_with_reflog >actual && + test_when_finished "git tag -d tag_with_reflog1" && + git tag --create-reflog tag_with_reflog1 && + git reflog exists refs/tags/tag_with_reflog1 && + test-tool ref-store main for-each-reflog-ent refs/tags/tag_with_reflog1 | sed -e "s/^.* //" >actual && test_cmp expected actual ' @@ -105,10 +105,10 @@ test_expect_success 'annotated tag with --create-reflog has correct message' ' git log -1 \ --format="format:tag: tagging %h (%s, %cd)%n" \ --date=format:%Y-%m-%d >expected && - test_when_finished "git tag -d tag_with_reflog" && - git tag -m "annotated tag" --create-reflog tag_with_reflog && - git reflog exists refs/tags/tag_with_reflog && - sed -e "s/^.* //" .git/logs/refs/tags/tag_with_reflog >actual && + test_when_finished "git tag -d tag_with_reflog2" && + git tag -m "annotated tag" --create-reflog tag_with_reflog2 && + git reflog exists refs/tags/tag_with_reflog2 && + test-tool ref-store main for-each-reflog-ent refs/tags/tag_with_reflog2 | sed -e "s/^.* //" >actual && test_cmp expected actual ' @@ -118,10 +118,10 @@ test_expect_success '--create-reflog does not create reflog on failure' ' ' test_expect_success 'option core.logAllRefUpdates=always creates reflog' ' - test_when_finished "git tag -d tag_with_reflog" && + test_when_finished "git tag -d tag_with_reflog3" && test_config core.logAllRefUpdates always && - git tag tag_with_reflog && - git reflog exists refs/tags/tag_with_reflog + git tag tag_with_reflog3 && + git reflog exists refs/tags/tag_with_reflog3 ' test_expect_success 'listing all tags if one exists should succeed' ' |