소스 검색

pre-push hook: Exclude merges from signoff check

Signed-off-by: Álvaro Brey Vilas <alvaro.brey@nextcloud.com>
Álvaro Brey Vilas 3 년 전
부모
커밋
267c4c2b72
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      scripts/hooks/pre-push

+ 1 - 1
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"