Subject: Re: [PATCH] test the commit.gpgsign config option

From: Junio C Hamano <[email-masked]>
Date: Tue, 17 Dec 2013 15:27:12 -0800

Junio C Hamano <[email-masked]> writes:

> If any of the above fail, the next test will run with an unknown
> random value in commit.gpgsign depending on where the sequence
> failed.  Use one test_when_finished with test_unconfig at the very
> beginning, perhaps.

In other words, I'll squash this in.

diff --git a/t/t7510-signed-commit.sh b/t/t7510-signed-commit.sh
index 537bfba..5ddac1a 100755
--- a/t/t7510-signed-commit.sh
+++ b/t/t7510-signed-commit.sh
@@ -5,6 +5,8 @@ test_description='signed commit tests'
 . "$TEST_DIRECTORY/lib-gpg.sh"
 
 test_expect_success GPG 'create signed commits' '
+	test_when_finished "test_unconfig commit.gpgsign" &&
+
 	echo 1 >file && git add file &&
 	test_tick && git commit -S -m initial &&
 	git tag initial &&
@@ -40,9 +42,7 @@ test_expect_success GPG 'create signed commits' '
 	git tag seventh-unsigned &&
 
 	test_tick && git rebase -f HEAD^^ && git tag sixth-signed HEAD^ &&
-	git tag seventh-signed &&
-
-	git config --unset commit.gpgsign
+	git tag seventh-signed
 '
 
 test_expect_success GPG 'show signatures' '