2014-10-27 08:07:25 +01:00
|
|
|
#!/bin/bash
|
2015-10-23 04:50:01 +02:00
|
|
|
if ! [[ "$2" =~ ^(git@)?(www.)?github.com(:|/)bitcoin/bitcoin(.git)?$ ]]; then
|
2014-10-27 08:07:25 +01:00
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
while read LINE; do
|
|
|
|
set -- A $LINE
|
|
|
|
if [ "$4" != "refs/heads/master" ]; then
|
|
|
|
continue
|
|
|
|
fi
|
|
|
|
if ! ./contrib/verify-commits/verify-commits.sh $3 > /dev/null 2>&1; then
|
|
|
|
echo "ERROR: A commit is not signed, can't push"
|
|
|
|
./contrib/verify-commits/verify-commits.sh
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
done < /dev/stdin
|