X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=t%2Ft7004-tag.sh;h=e285686662df781c87d59c910aa9d596eb974c34;hb=eea9c1e78ffd878cbaaf2c1e346e186a1e58a460;hp=0b01862c23aa182ee4ae7ce2944a40b4449d6049;hpb=25e4da89edc5339019f0d7c29a21ef4e08cccf24;p=thirdparty%2Fgit.git 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