Skip to content

Commit

Permalink
Merge branch 'maint'
Browse files Browse the repository at this point in the history
* maint:
  t7004: do not create unneeded gpghome/gpg.conf when GPG is not used
  • Loading branch information
Junio C Hamano committed Dec 18, 2012
2 parents b7cd0c9 + 086cb91 commit 252f922
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion t/t7004-tag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1066,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
Expand All @@ -1085,18 +1085,21 @@ 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
'

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 &&
Expand Down

0 comments on commit 252f922

Please sign in to comment.