Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael J Gruber <git@drmicha.warpmail.net>2014-06-23 11:05:50 +0400
committerJunio C Hamano <gitster@pobox.com>2014-06-24 02:50:31 +0400
commit0f109c92b07eb13ffc675a7e98e9cfc3fee42994 (patch)
tree1d382069ce3bca622170e0164d6968ba39213f29 /t/t7510-signed-commit.sh
parentd07b00b7f31d0cb6675b4bdba269ce7f087ddd24 (diff)
t7510: exit for loop with test result
t7510 uses for loops in a subshell, which need to make sure that the test returns with the appropriate error code from within the loop. Restructure the loops as the usual && chains with a single point of "exit 1" at the end of the loop to make this clearer. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7510-signed-commit.sh')
-rwxr-xr-xt/t7510-signed-commit.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/t/t7510-signed-commit.sh b/t/t7510-signed-commit.sh
index 5ddac1a9f7..96cfddf80f 100755
--- a/t/t7510-signed-commit.sh
+++ b/t/t7510-signed-commit.sh
@@ -50,7 +50,7 @@ test_expect_success GPG 'show signatures' '
for commit in initial second merge fourth-signed fifth-signed sixth-signed master
do
git show --pretty=short --show-signature $commit >actual &&
- grep "Good signature from" actual || exit 1
+ grep "Good signature from" actual &&
! grep "BAD signature from" actual || exit 1
echo $commit OK
done
@@ -59,7 +59,7 @@ test_expect_success GPG 'show signatures' '
for commit in merge^2 fourth-unsigned sixth-unsigned seventh-unsigned
do
git show --pretty=short --show-signature $commit >actual &&
- grep "Good signature from" actual && exit 1
+ ! grep "Good signature from" actual &&
! grep "BAD signature from" actual || exit 1
echo $commit OK
done