This patch changes the pre-commit hook to check whether more than one
person has signed off/acked a patch. If that is not the case, it will
output a warning, but the commit will not fail.
It is possible to amend this hook to check for triviality of patches
later, but for now the warning is better than nothing.
Signed-off-by: Carl-Daniel Hailfinger <[EMAIL PROTECTED]>
---
--- pre-commit~ 2007-10-02 18:19:16.000000000 +0200
+++ pre-commit 2007-10-02 18:36:12.000000000 +0200
@@ -72,7 +72,6 @@
exit 1;
}
-
$SVNLOOK log -t "$TXN" "$REPOS" | \
grep -i "Acked-by: [EMAIL PROTECTED]" > /dev/null || {
echo "commit is not reviewed by anyone. sorry." >&2
@@ -80,6 +79,15 @@
exit 1;
}
+$SVNLOOK log -t "$TXN" "$REPOS" | \
+ grep -i "Signed-off-by: [EMAIL PROTECTED]|Acked-by: [EMAIL PROTECTED]" | \
+ sed "s/.*-by://;s/^[[:blank:]]*//;s/[[:blank:]]*$//" | \
+ sort -u|wc -l|xargs test 1 -eq >/dev/null && {
+ echo "Commit has not been signed off/acked by more than one
person." >&2
+ echo "This is allowed only for trivial patches." >&2
+ #FIXME: Check whether the patch is trivial, for now don't fail
+ }
+
# Check that the author of this commit has the rights to perform
# the commit on the files and directories being modified.
--
linuxbios mailing list
[email protected]
http://www.linuxbios.org/mailman/listinfo/linuxbios