Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
t7510: exit for loop with test result
author
Michael J Gruber
<git@drmicha.warpmail.net>
Mon, 23 Jun 2014 07:05:50 +0000
(09:05 +0200)
committer
Junio C Hamano
<gitster@pobox.com>
Mon, 23 Jun 2014 22:50:31 +0000
(15:50 -0700)
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>
t/t7510-signed-commit.sh
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
d07b00b
)
diff --git
a/t/t7510-signed-commit.sh
b/t/t7510-signed-commit.sh
index 5ddac1a9f740c03f1d94f75db2c6e54dd3391eda..96cfddf80fa0e01a7c3d184fa8ecf26842a41d44 100755
(executable)
--- 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 &&
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
! 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 &&
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
! grep "BAD signature from" actual || exit 1
echo $commit OK
done