Skip to content

Commit 3e900ac

Browse files
committed
Require merge commits merge branches on top of other merge commits
Specifically, require that the left branch (first restult of git show -s --format=format:%P) is a signed merge commit, instead of allowing either. This is fine for now, but might need to be relaxed in the future. Also fixes an out-of-file-descriptors issue by holding too many open FDs writing to /dev/null
1 parent 77bd8c4 commit 3e900ac

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

contrib/verify-commits/verify-commits.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,10 @@ IS_SIGNED () {
2828
local PARENTS
2929
PARENTS=$(git show -s --format=format:%P $1)
3030
for PARENT in $PARENTS; do
31-
if IS_SIGNED $PARENT > /dev/null; then
31+
if IS_SIGNED $PARENT; then
3232
return 0;
3333
fi
34+
break
3435
done
3536
if ! "$HAVE_FAILED"; then
3637
echo "No parent of $1 was signed with a trusted key!" > /dev/stderr

0 commit comments

Comments
 (0)