From 3c868cff69879f5addadc1529f4b9eee1a755a43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Wed, 4 Dec 2013 08:58:58 +0100 Subject: Add script to check Signed-off-by header in patches MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michal Čihař --- scripts/check-dco | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 scripts/check-dco (limited to 'scripts') diff --git a/scripts/check-dco b/scripts/check-dco new file mode 100755 index 0000000000..15c36bef0d --- /dev/null +++ b/scripts/check-dco @@ -0,0 +1,21 @@ +#!/bin/sh +# Checks whether all commits in given range have Signed-Off-By + +if [ -z "$1" ] ; then + echo "Usage: check-dco COMMITRANGE" + exit 1 +fi + +RESULT=0 + +for rev in `git rev-list --no-merges $1` ; do + if ! git log -1 $rev | grep -iq '^ Signed-Off-By:' ; then + echo '------------------------------------------' + echo "Missing Signed-Off-By in following commit:" + git --no-pager log -1 $rev + echo + RESULT=1 + fi +done + +exit $RESULT -- cgit v1.2.3