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>
This commit is contained in:
Martin Ågren 2019-11-13 20:39:02 +01:00 коммит произвёл Junio C Hamano
Родитель 5fa0f5238b
Коммит b018719927
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -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' \