From 267c4c2b72de73ef4d5483b67cac555110fe893f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Brey=20Vilas?= Date: Wed, 13 Oct 2021 09:55:07 +0200 Subject: [PATCH] pre-push hook: Exclude merges from signoff check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Álvaro Brey Vilas --- scripts/hooks/pre-push | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/hooks/pre-push b/scripts/hooks/pre-push index 2c7d8ac0b4..628975cb21 100755 --- a/scripts/hooks/pre-push +++ b/scripts/hooks/pre-push @@ -15,7 +15,7 @@ while read local_ref local_sha remote_ref remote_sha; do fi # Check for commits without sign-off - commit=$(git rev-list --grep 'Signed-off-by' --invert-grep "$range") + commit=$(git rev-list --no-merges --grep 'Signed-off-by' --invert-grep "$range") if [ -n "$commit" ]; then echo >&2 "Found commits without sign-off in $local_ref. Aborting push. Offending commits:" echo >&2 "$commit"