@@ -61,8 +61,9 @@ test_expect_success 'sort tags, ignore case' '
6161 )
6262'
6363
64- test_expect_success ' looking for a tag in an empty tree should fail' \
65- ' ! (tag_exists mytag)'
64+ test_expect_success ' looking for a tag in an empty tree should fail' '
65+ ! (tag_exists mytag)
66+ '
6667
6768test_expect_success ' creating a tag in an empty tree should fail' '
6869 test_must_fail git tag mynotag &&
@@ -148,25 +149,31 @@ test_expect_success 'listing all tags if one exists should output that tag' '
148149
149150# pattern matching:
150151
151- test_expect_success ' listing a tag using a matching pattern should succeed' \
152- ' git tag -l mytag'
152+ test_expect_success ' listing a tag using a matching pattern should succeed' '
153+ git tag -l mytag
154+ '
153155
154- test_expect_success ' listing a tag with --ignore-case' \
155- ' test $(git tag -l --ignore-case MYTAG) = mytag'
156+ test_expect_success ' listing a tag with --ignore-case' '
157+ test $(git tag -l --ignore-case MYTAG) = mytag
158+ '
156159
157- test_expect_success ' listing a tag using a matching pattern should output that tag' \
158- ' test $(git tag -l mytag) = mytag'
160+ test_expect_success ' listing a tag using a matching pattern should output that tag' '
161+ test $(git tag -l mytag) = mytag
162+ '
159163
160- test_expect_success ' listing tags using a non-matching pattern should succeed' \
161- ' git tag -l xxx'
164+ test_expect_success ' listing tags using a non-matching pattern should succeed' '
165+ git tag -l xxx
166+ '
162167
163- test_expect_success ' listing tags using a non-matching pattern should output nothing' \
164- ' test $(git tag -l xxx | wc -l) -eq 0'
168+ test_expect_success ' listing tags using a non-matching pattern should output nothing' '
169+ test $(git tag -l xxx | wc -l) -eq 0
170+ '
165171
166172# special cases for creating tags:
167173
168- test_expect_success ' trying to create a tag with the name of one existing should fail' \
169- ' test_must_fail git tag mytag'
174+ test_expect_success ' trying to create a tag with the name of one existing should fail' '
175+ test_must_fail git tag mytag
176+ '
170177
171178test_expect_success ' trying to create a tag with a non-valid name should fail' '
172179 test $(git tag -l | wc -l) -eq 1 &&
@@ -236,8 +243,9 @@ test_expect_success 'trying to delete two tags, existing and not, should fail in
236243 ! tag_exists nonexistingtag
237244'
238245
239- test_expect_success ' trying to delete an already deleted tag should fail' \
240- ' test_must_fail git tag -d mytag'
246+ test_expect_success ' trying to delete an already deleted tag should fail' '
247+ test_must_fail git tag -d mytag
248+ '
241249
242250# listing various tags with pattern matching:
243251
@@ -417,14 +425,17 @@ test_expect_success 'a non-annotated tag created without parameters should point
417425 test $(git rev-parse non-annotated-tag) = $(git rev-parse HEAD)
418426'
419427
420- test_expect_success ' trying to verify an unknown tag should fail' \
421- ' test_must_fail git tag -v unknown-tag'
428+ test_expect_success ' trying to verify an unknown tag should fail' '
429+ test_must_fail git tag -v unknown-tag
430+ '
422431
423- test_expect_success ' trying to verify a non-annotated and non-signed tag should fail' \
424- ' test_must_fail git tag -v non-annotated-tag'
432+ test_expect_success ' trying to verify a non-annotated and non-signed tag should fail' '
433+ test_must_fail git tag -v non-annotated-tag
434+ '
425435
426- test_expect_success ' trying to verify many non-annotated or unknown tags, should fail' \
427- ' test_must_fail git tag -v unknown-tag1 non-annotated-tag unknown-tag2'
436+ test_expect_success ' trying to verify many non-annotated or unknown tags, should fail' '
437+ test_must_fail git tag -v unknown-tag1 non-annotated-tag unknown-tag2
438+ '
428439
429440# creating annotated tags:
430441
@@ -1014,8 +1025,8 @@ test_expect_success GPG '-s implies annotated tag' '
10141025 test_cmp expect actual
10151026'
10161027
1017- test_expect_success GPG ' git tag -s implied if configured with tag.forcesignannotated' \
1018- ' get_tag_header forcesignannotated-implied-sign $commit commit $time >expect &&
1028+ test_expect_success GPG ' git tag -s implied if configured with tag.forcesignannotated' '
1029+ get_tag_header forcesignannotated-implied-sign $commit commit $time >expect &&
10191030 echo "A message" >>expect &&
10201031 echo "-----BEGIN PGP SIGNATURE-----" >>expect &&
10211032 test_config tag.forcesignannotated true &&
@@ -1024,15 +1035,15 @@ test_expect_success GPG 'git tag -s implied if configured with tag.forcesignanno
10241035 test_cmp expect actual
10251036'
10261037
1027- test_expect_success GPG ' lightweight with no message when configured with tag.forcesignannotated' \
1028- ' test_config tag.forcesignannotated true &&
1038+ test_expect_success GPG ' lightweight with no message when configured with tag.forcesignannotated' '
1039+ test_config tag.forcesignannotated true &&
10291040 git tag forcesignannotated-lightweight &&
10301041 tag_exists forcesignannotated-lightweight &&
10311042 test_must_fail git tag -v forcesignannotated-no-message
10321043'
10331044
1034- test_expect_success GPG ' git tag -a disable configured tag.forcesignannotated' \
1035- ' get_tag_header forcesignannotated-annotate $commit commit $time >expect &&
1045+ test_expect_success GPG ' git tag -a disable configured tag.forcesignannotated' '
1046+ get_tag_header forcesignannotated-annotate $commit commit $time >expect &&
10361047 echo "A message" >>expect &&
10371048 test_config tag.forcesignannotated true &&
10381049 git tag -a -m "A message" forcesignannotated-annotate &&
@@ -1041,8 +1052,8 @@ test_expect_success GPG 'git tag -a disable configured tag.forcesignannotated' \
10411052 test_must_fail git tag -v forcesignannotated-annotate
10421053'
10431054
1044- test_expect_success GPG ' git tag --sign enable GPG sign' \
1045- ' get_tag_header forcesignannotated-disabled $commit commit $time >expect &&
1055+ test_expect_success GPG ' git tag --sign enable GPG sign' '
1056+ get_tag_header forcesignannotated-disabled $commit commit $time >expect &&
10461057 echo "A message" >>expect &&
10471058 echo "-----BEGIN PGP SIGNATURE-----" >>expect &&
10481059 test_config tag.forcesignannotated false &&
@@ -1051,8 +1062,8 @@ test_expect_success GPG 'git tag --sign enable GPG sign' \
10511062 test_cmp expect actual
10521063'
10531064
1054- test_expect_success GPG ' git tag configured tag.gpgsign enables GPG sign' \
1055- ' get_tag_header gpgsign-enabled $commit commit $time >expect &&
1065+ test_expect_success GPG ' git tag configured tag.gpgsign enables GPG sign' '
1066+ get_tag_header gpgsign-enabled $commit commit $time >expect &&
10561067 echo "A message" >>expect &&
10571068 echo "-----BEGIN PGP SIGNATURE-----" >>expect &&
10581069 test_config tag.gpgsign true &&
@@ -1061,8 +1072,8 @@ test_expect_success GPG 'git tag configured tag.gpgsign enables GPG sign' \
10611072 test_cmp expect actual
10621073'
10631074
1064- test_expect_success GPG ' git tag --no-sign configured tag.gpgsign skip GPG sign' \
1065- ' get_tag_header no-sign $commit commit $time >expect &&
1075+ test_expect_success GPG ' git tag --no-sign configured tag.gpgsign skip GPG sign' '
1076+ get_tag_header no-sign $commit commit $time >expect &&
10661077 echo "A message" >>expect &&
10671078 test_config tag.gpgsign true &&
10681079 git tag -a --no-sign -m "A message" no-sign &&
@@ -1077,11 +1088,13 @@ test_expect_success GPG 'trying to create a signed tag with non-existing -F file
10771088 ! tag_exists nosigtag
10781089'
10791090
1080- test_expect_success GPG ' verifying a signed tag should succeed' \
1081- ' git tag -v signed-tag'
1091+ test_expect_success GPG ' verifying a signed tag should succeed' '
1092+ git tag -v signed-tag
1093+ '
10821094
1083- test_expect_success GPG ' verifying two signed tags in one command should succeed' \
1084- ' git tag -v signed-tag file-signed-tag'
1095+ test_expect_success GPG ' verifying two signed tags in one command should succeed' '
1096+ git tag -v signed-tag file-signed-tag
1097+ '
10851098
10861099test_expect_success GPG ' verifying many signed and non-signed tags should fail' '
10871100 test_must_fail git tag -v signed-tag annotated-tag &&
@@ -1451,14 +1464,16 @@ test_expect_success GPG,RFC1991 'reediting a signed tag body omits signature' '
14511464'
14521465
14531466# try to sign with bad user.signingkey
1454- test_expect_success GPG ' git tag -s fails if gpg is misconfigured (bad key)' \
1455- ' test_config user.signingkey BobTheMouse &&
1456- test_must_fail git tag -s -m tail tag-gpg-failure'
1467+ test_expect_success GPG ' git tag -s fails if gpg is misconfigured (bad key)' '
1468+ test_config user.signingkey BobTheMouse &&
1469+ test_must_fail git tag -s -m tail tag-gpg-failure
1470+ '
14571471
14581472# try to produce invalid signature
1459- test_expect_success GPG ' git tag -s fails if gpg is misconfigured (bad signature format)' \
1460- ' test_config gpg.program echo &&
1461- test_must_fail git tag -s -m tail tag-gpg-failure'
1473+ test_expect_success GPG ' git tag -s fails if gpg is misconfigured (bad signature format)' '
1474+ test_config gpg.program echo &&
1475+ test_must_fail git tag -s -m tail tag-gpg-failure
1476+ '
14621477
14631478# try to produce invalid signature
14641479test_expect_success GPG ' git verifies tag is valid with double signature' '
@@ -1479,21 +1494,23 @@ test_expect_success GPG 'git verifies tag is valid with double signature' '
14791494'
14801495
14811496# try to sign with bad user.signingkey
1482- test_expect_success GPGSM ' git tag -s fails if gpgsm is misconfigured (bad key)' \
1483- ' test_config user.signingkey BobTheMouse &&
1484- test_config gpg.format x509 &&
1485- test_must_fail git tag -s -m tail tag-gpg-failure'
1497+ test_expect_success GPGSM ' git tag -s fails if gpgsm is misconfigured (bad key)' '
1498+ test_config user.signingkey BobTheMouse &&
1499+ test_config gpg.format x509 &&
1500+ test_must_fail git tag -s -m tail tag-gpg-failure
1501+ '
14861502
14871503# try to produce invalid signature
1488- test_expect_success GPGSM ' git tag -s fails if gpgsm is misconfigured (bad signature format)' \
1489- ' test_config gpg.x509.program echo &&
1490- test_config gpg.format x509 &&
1491- test_must_fail git tag -s -m tail tag-gpg-failure'
1504+ test_expect_success GPGSM ' git tag -s fails if gpgsm is misconfigured (bad signature format)' '
1505+ test_config gpg.x509.program echo &&
1506+ test_config gpg.format x509 &&
1507+ test_must_fail git tag -s -m tail tag-gpg-failure
1508+ '
14921509
14931510# try to verify without gpg:
14941511
1495- test_expect_success GPG ' verify signed tag fails when public key is not present' \
1496- ' rm -rf gpghome &&
1512+ test_expect_success GPG ' verify signed tag fails when public key is not present' '
1513+ rm -rf gpghome &&
14971514 test_must_fail git tag -v signed-tag
14981515'
14991516
0 commit comments