deprecate core.statinfo at Git 2.0 boundary
[gitweb.git] / t / t7004-tag.sh
index f8c247a7500d723e46796e7b9b76b9812e35db9b..f5a79b13aecf4020b8a453f5f27568ce4f88bbbc 100755 (executable)
@@ -263,6 +263,50 @@ test_expect_success 'tag -l can accept multiple patterns' '
        test_cmp expect actual
 '
 
+test_expect_success 'listing tags in column' '
+       COLUMNS=40 git tag -l --column=row >actual &&
+       cat >expected <<\EOF &&
+a1      aa1     cba     t210    t211
+v0.2.1  v1.0    v1.0.1  v1.1.3
+EOF
+       test_cmp expected actual
+'
+
+test_expect_success 'listing tags in column with column.*' '
+       git config column.tag row &&
+       git config column.ui dense &&
+       COLUMNS=40 git tag -l >actual &&
+       git config --unset column.ui &&
+       git config --unset column.tag &&
+       cat >expected <<\EOF &&
+a1      aa1   cba     t210    t211
+v0.2.1  v1.0  v1.0.1  v1.1.3
+EOF
+       test_cmp expected actual
+'
+
+test_expect_success 'listing tag with -n --column should fail' '
+       test_must_fail git tag --column -n
+'
+
+test_expect_success 'listing tags -n in column with column.ui ignored' '
+       git config column.ui "row dense" &&
+       COLUMNS=40 git tag -l -n >actual &&
+       git config --unset column.ui &&
+       cat >expected <<\EOF &&
+a1              Foo
+aa1             Foo
+cba             Foo
+t210            Foo
+t211            Foo
+v0.2.1          Foo
+v1.0            Foo
+v1.0.1          Foo
+v1.1.3          Foo
+EOF
+       test_cmp expected actual
+'
+
 # creating and verifying lightweight tags:
 
 test_expect_success \
@@ -1022,12 +1066,12 @@ test_expect_success GPG \
 '
 
 # usage with rfc1991 signatures
-echo "rfc1991" > gpghome/gpg.conf
 get_tag_header rfc1991-signed-tag $commit commit $time >expect
 echo "RFC1991 signed tag" >>expect
 echo '-----BEGIN PGP MESSAGE-----' >>expect
 test_expect_success GPG \
        'creating a signed tag with rfc1991' '
+       echo "rfc1991" >gpghome/gpg.conf &&
        git tag -s -m "RFC1991 signed tag" rfc1991-signed-tag $commit &&
        get_tag_msg rfc1991-signed-tag >actual &&
        test_cmp expect actual
@@ -1041,6 +1085,7 @@ chmod +x fakeeditor
 
 test_expect_success GPG \
        'reediting a signed tag body omits signature' '
+       echo "rfc1991" >gpghome/gpg.conf &&
        echo "RFC1991 signed tag" >expect &&
        GIT_EDITOR=./fakeeditor git tag -f -s rfc1991-signed-tag $commit &&
        test_cmp expect actual
@@ -1048,11 +1093,13 @@ test_expect_success GPG \
 
 test_expect_success GPG \
        'verifying rfc1991 signature' '
+       echo "rfc1991" >gpghome/gpg.conf &&
        git tag -v rfc1991-signed-tag
 '
 
 test_expect_success GPG \
        'list tag with rfc1991 signature' '
+       echo "rfc1991" >gpghome/gpg.conf &&
        echo "rfc1991-signed-tag RFC1991 signed tag" >expect &&
        git tag -l -n1 rfc1991-signed-tag >actual &&
        test_cmp expect actual &&