[PATCH] hooks/pre-commit: add example to add Signed-off-by line to message

From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Date: 2006-11-29 22:20:08
It is good to have an example of how to supply a template for the
commit message anyway.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
---
 templates/hooks--pre-commit |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/templates/hooks--pre-commit b/templates/hooks--pre-commit
index 723a9ef..931f127 100644
--- a/templates/hooks--pre-commit
+++ b/templates/hooks--pre-commit
@@ -7,6 +7,13 @@
 #
 # To enable this hook, make this file executable.
 
+# Uncomment this to add a Signed-off-by line to the message.
+
+# . git-sh-setup
+# git var GIT_AUTHOR_IDENT | \
+# sed -n "s/^\(.*\) [0-9]\+ [-+][0-9]\+$/Signed-off-by: \1/p" \
+# > $GIT_DIR/SQUASH_MSG
+
 # This is slightly modified from Andrew Morton's Perfect Patch.
 # Lines you introduce should not have trailing whitespace.
 # Also check for an indentation that has SP before a TAB.
-- 
1.4.4.1.gb475

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Wed Nov 29 22:20:19 2006

This archive was generated by hypermail 2.1.8 : 2006-11-29 22:21:42 EST