diff options
Diffstat (limited to 't/t7004-tag.sh')
-rwxr-xr-x | t/t7004-tag.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/t/t7004-tag.sh b/t/t7004-tag.sh index 0b01862c23..e285686662 100755 --- a/t/t7004-tag.sh +++ b/t/t7004-tag.sh @@ -1700,6 +1700,17 @@ test_expect_success '--points-at finds annotated tags of tags' ' test_cmp expect actual ' +test_expect_success 'recursive tagging should give advice' ' + sed -e "s/|$//" <<-EOF >expect && + hint: You have created a nested tag. The object referred to by your new is + hint: already a tag. If you meant to tag the object that it points to, use: + hint: | + hint: git tag -f nested annotated-v4.0^{} + EOF + git tag -m nested nested annotated-v4.0 2>actual && + test_i18ncmp expect actual +' + test_expect_success 'multiple --points-at are OR-ed together' ' cat >expect <<-\EOF && v2.0 |