git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] hooks/pre-commit: add example to add Signed-off-by line to message
@ 2006-11-29 11:20 Johannes Schindelin
  2006-12-20 15:54 ` Andy Parkins
  2006-12-20 16:04 ` Andy Parkins
  0 siblings, 2 replies; 11+ messages in thread
From: Johannes Schindelin @ 2006-11-29 11:20 UTC (permalink / raw)
  To: Andy Parkins, git, junkio


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

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2006-12-22  9:28 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-29 11:20 [PATCH] hooks/pre-commit: add example to add Signed-off-by line to message Johannes Schindelin
2006-12-20 15:54 ` Andy Parkins
2006-12-20 16:04 ` Andy Parkins
2006-12-20 16:18   ` Johannes Schindelin
2006-12-20 17:29     ` Junio C Hamano
2006-12-20 17:37       ` Johannes Schindelin
2006-12-20 17:44         ` Junio C Hamano
2006-12-21  8:26           ` Johannes Schindelin
2006-12-21  9:24           ` [PATCH] hooks/commit-msg: " Andy Parkins
2006-12-22  5:45             ` Junio C Hamano
2006-12-22  9:28               ` Andy Parkins

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).