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>
Martin Ågren committed
Nov 13, 2019 at 20:39 UTC
b018719927689edc7aaf27ba047b7482271f23f0
1 file changed
+3
-3
t/t7004-tag.sh
+3
-3
@@ -227,10 +227,10 @@ test_expect_success \
227
test_expect_success \
228
'trying to delete two tags, existing and not, should fail in the 2nd' '
229
tag_exists mytag &&
230
- ! tag_exists myhead &&
231
- test_must_fail git tag -d mytag anothertag &&
230
+ ! tag_exists nonexistingtag &&
231
+ test_must_fail git tag -d mytag nonexistingtag &&
232
! tag_exists mytag &&
233
- ! tag_exists myhead
233
+ ! tag_exists nonexistingtag
234
'
235
236
test_expect_success 'trying to delete an already deleted tag should fail' \