Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Ågren <martin.agren@gmail.com>2019-11-13 22:39:02 +0300
committerJunio C Hamano <gitster@pobox.com>2019-11-14 05:21:41 +0300
commitb018719927689edc7aaf27ba047b7482271f23f0 (patch)
tree85c5624e59d4d081f8ad1815ed89c0d3e056fe1a /t/t7004-tag.sh
parent5fa0f5238b0cd46cfe7f6fa76c3f526ea98148d9 (diff)
t7004: check existence of correct tag
We try to delete the non-existing tag "anothertag", but for the verifications, we check that the tag "myhead" doesn't exist. "myhead" isn't used in this test except for this checking. Comparing to the test two tests earlier, it looks like a copy-paste mistake. Perhaps it's overkill to check that `git tag -d` didn't decide to *create* a tag. But since we're trying to be this careful, let's actually check the correct tag. While we're doing this, let's use a more descriptive tag name instead -- "nonexistingtag" should be obvious. Signed-off-by: Martin Ågren <martin.agren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7004-tag.sh')
-rwxr-xr-xt/t7004-tag.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/t/t7004-tag.sh b/t/t7004-tag.sh
index 80eb13d94e..e4cf605907 100755
--- a/t/t7004-tag.sh
+++ b/t/t7004-tag.sh
@@ -227,10 +227,10 @@ test_expect_success \
test_expect_success \
'trying to delete two tags, existing and not, should fail in the 2nd' '
tag_exists mytag &&
- ! tag_exists myhead &&
- test_must_fail git tag -d mytag anothertag &&
+ ! tag_exists nonexistingtag &&
+ test_must_fail git tag -d mytag nonexistingtag &&
! tag_exists mytag &&
- ! tag_exists myhead
+ ! tag_exists nonexistingtag
'
test_expect_success 'trying to delete an already deleted tag should fail' \