git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Commit template

From
Sean <seanlkml@sympatico.ca>
Date
May 8, 2005, 19:07 UTC
Message-ID
<1965.10.10.10.24.1115579256.squirrel@linux1>
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.
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
Next: Marcel Holtmann
Message 1 of 11 in “Commit template”
  1. SeanMay 8, 2005
  2. Marcel HoltmannMay 8, 2005
  3. SeanMay 8, 2005
  4. Marcel HoltmannMay 8, 2005
  5. SeanMay 8, 2005
  6. Marcel HoltmannMay 8, 2005
  7. SeanMay 8, 2005
  8. Petr BaudisMay 8, 2005
  9. Marcel HoltmannMay 8, 2005
  10. Petr BaudisMay 8, 2005
  11. Marcel HoltmannMay 8, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.