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
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