Skip to content

Commit b018719

Browse files
Martin Ågrengitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 5fa0f52 commit b018719

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

t/t7004-tag.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,10 +227,10 @@ test_expect_success \
227227
test_expect_success \
228228
'trying to delete two tags, existing and not, should fail in the 2nd' '
229229
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 &&
232232
! tag_exists mytag &&
233-
! tag_exists myhead
233+
! tag_exists nonexistingtag
234234
'
235235

236236
test_expect_success 'trying to delete an already deleted tag should fail' \

0 commit comments

Comments
 (0)