Skip to content

Commit 086cb91

Browse files
committed
t7004: do not create unneeded gpghome/gpg.conf when GPG is not used
These tests themselves are properly protected by the GPG prerequisite, but one of the set-up steps outside the test_expect_success block unconditionally assumed that there is a gpghome/ directory, which is not true if GPG is not being used. It may be a good idea to move the whole set-up steps in the test but that is a follow-up topic. Signed-off-by: Junio C Hamano <[email protected]>
1 parent 8e8c881 commit 086cb91

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

t/t7004-tag.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1066,12 +1066,12 @@ test_expect_success GPG \
10661066
'
10671067

10681068
# usage with rfc1991 signatures
1069-
echo "rfc1991" > gpghome/gpg.conf
10701069
get_tag_header rfc1991-signed-tag $commit commit $time >expect
10711070
echo "RFC1991 signed tag" >>expect
10721071
echo '-----BEGIN PGP MESSAGE-----' >>expect
10731072
test_expect_success GPG \
10741073
'creating a signed tag with rfc1991' '
1074+
echo "rfc1991" >gpghome/gpg.conf &&
10751075
git tag -s -m "RFC1991 signed tag" rfc1991-signed-tag $commit &&
10761076
get_tag_msg rfc1991-signed-tag >actual &&
10771077
test_cmp expect actual
@@ -1085,18 +1085,21 @@ chmod +x fakeeditor
10851085

10861086
test_expect_success GPG \
10871087
'reediting a signed tag body omits signature' '
1088+
echo "rfc1991" >gpghome/gpg.conf &&
10881089
echo "RFC1991 signed tag" >expect &&
10891090
GIT_EDITOR=./fakeeditor git tag -f -s rfc1991-signed-tag $commit &&
10901091
test_cmp expect actual
10911092
'
10921093

10931094
test_expect_success GPG \
10941095
'verifying rfc1991 signature' '
1096+
echo "rfc1991" >gpghome/gpg.conf &&
10951097
git tag -v rfc1991-signed-tag
10961098
'
10971099

10981100
test_expect_success GPG \
10991101
'list tag with rfc1991 signature' '
1102+
echo "rfc1991" >gpghome/gpg.conf &&
11001103
echo "rfc1991-signed-tag RFC1991 signed tag" >expect &&
11011104
git tag -l -n1 rfc1991-signed-tag >actual &&
11021105
test_cmp expect actual &&

0 commit comments

Comments
 (0)