Git development
 help / color / mirror / Atom feed
* Commit template
@ 2005-05-08 19:07 Sean
  2005-05-08 19:16 ` Marcel Holtmann
  0 siblings, 1 reply; 11+ messages in thread
From: Sean @ 2005-05-08 19:07 UTC (permalink / raw)
  To: Petr Baudis; +Cc: GIT Mailing List

[-- Attachment #1: Type: text/plain, Size: 416 bytes --]

Hi Petr,

This adds the ability to have a per repository commit template.  Create a
.git/commit.form file containg  "CG: " and other lines and it will be used
in place of the regular top 3 lines.  This is kind of handy so that you
can include your signed-off-by: with your email etc.

 cg-commit |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

Sean

P.s. Can't inline patches with this mailer.

[-- Attachment #2: cg-commit.patch --]
[-- Type: application/octet-stream, Size: 896 bytes --]

cg-commit: needs update
Index: cg-commit
===================================================================
--- b2ce852fd77209e112e0b53866ca7004e9b0879f/cg-commit  (mode:100755)
+++ uncommitted/cg-commit  (mode:100755)
@@ -67,9 +67,14 @@
 
 LOGMSG=$(mktemp -t gitci.XXXXXX)
 LOGMSG2=$(mktemp -t gitci2.XXXXXX)
-echo CG: ---------------------------------------------------------- >>$LOGMSG
-echo CG: Lines beggining with CG: will be automatically removed     >>$LOGMSG
-echo CG:                                                            >>$LOGMSG
+if [ -e .git/commit.form ]; then
+	cat .git/commit.form >>$LOGMSG
+else
+	{
+	echo "CG: ----------------------------------------------------------"
+	echo "CG: Lines beggining with CG: will be automatically removed"
+	echo "CG:"; } >>$LOGMSG
+fi
 if [ ! "$ignorecache" ]; then
 	if [ ! "${commitfiles[*]}" ]; then
 		echo 'Nothing to commit.' >&2

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

end of thread, other threads:[~2005-05-08 21:02 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-08 19:07 Commit template Sean
2005-05-08 19:16 ` Marcel Holtmann
2005-05-08 19:20   ` Sean
2005-05-08 19:30     ` Marcel Holtmann
2005-05-08 19:57       ` Sean
2005-05-08 20:03         ` Marcel Holtmann
2005-05-08 20:06           ` Sean
2005-05-08 20:17             ` Petr Baudis
2005-05-08 20:36               ` Marcel Holtmann
2005-05-08 20:40                 ` Petr Baudis
2005-05-08 21:09                   ` Marcel Holtmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox