aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNils Gillmann <gillmann@infotropique.org>2018-04-22 18:10:07 +0000
committerNils Gillmann <gillmann@infotropique.org>2018-04-22 18:10:07 +0000
commitebfde2db477755f491fce4c0fb082f1597ef85b0 (patch)
treef787fffc706a0f15378ea81c1b5ffac93989502d
parent7a7a0c64c434609841f50f09a3be06b55c91881c (diff)
downloaddev_tools-ebfde2db477755f491fce4c0fb082f1597ef85b0.tar
dev_tools-ebfde2db477755f491fce4c0fb082f1597ef85b0.tar.gz
import the git hook from one of the other reposHEADmaster
Signed-off-by: Nils Gillmann <gillmann@infotropique.org>
-rwxr-xr-xgit-hooks/commit-msg12
1 files changed, 12 insertions, 0 deletions
diff --git a/git-hooks/commit-msg b/git-hooks/commit-msg
new file mode 100755
index 0000000..6c188f8
--- /dev/null
+++ b/git-hooks/commit-msg
@@ -0,0 +1,12 @@
+#!/bin/sh
+RED=""
+NORMAL=""
+if [ -f ~/.term_colors ]; then
+ . ~/.term_colors
+fi
+
+if [ "1" != "$(grep -c '^Signed-off-by: ' "$1")" ]; then
+ printf >&2 "%sMissing Signed-off-by line.%s\n" "$RED" "$NORMAL"
+ printf >&2 "%sYou need to add --signoff or -s%s\n" "$RED" "$NORMAL"
+ exit 1
+fi