]> git.ozlabs.org Git - next-scripts/commitdiff
no_sig: send messages about missing SOB lines
authorStephen Rothwell <sfr@canb.auug.org.au>
Sun, 5 Nov 2017 20:53:21 +0000 (07:53 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Sun, 5 Nov 2017 20:53:21 +0000 (07:53 +1100)
check_commits allow for indented SOB lines

check_commits
no_sig [new file with mode: 0755]

index d82c18aa23786294e538edef10179064f49b75af..6fc5265420a69a390006122728a1dc8b46950de0 100755 (executable)
@@ -14,7 +14,7 @@ for c in $(git rev-list --no-merges "$@"); do
        cE=$(git log -1 --format='%cE' "$c")
        cn=$(git log -1 --format='%cn' "$c")
        cN=$(git log -1 --format='%cN' "$c")
-       sob=$(git log -1 --format='%b' "$c" | grep -i 'Signed-off-by')
+       sob=$(git log -1 --format='%b' "$c" | grep -i '^[[:space:]]*Signed-off-by:')
 
        am=false
        cm=false
@@ -37,4 +37,4 @@ for c in $(git rev-list --no-merges "$@"); do
        fi
 done
 
-exit 0
+exec gitk "$@"
diff --git a/no_sig b/no_sig
new file mode 100755 (executable)
index 0000000..491517e
--- /dev/null
+++ b/no_sig
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+subject="Signed-off-by missing for commit in the BRANCH tree"
+
+tools_dir=$(dirname "$0")
+"$tools_dir"/message_helper "$@" "$subject" <<EOF
+Commit
+
+   ("")
+
+is missing a Signed-off-by from its .
+EOF
+
+exit 0