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

[PATCH] cg-tag - add support for longer commit messages

From
MLMartin Langhoff <martin@catalyst.net.nz>
Date
Oct 11, 2005, 02:45 UTC
Message-ID
<11289987493327-git-send-email-martin@catalyst.net.nz>

Added an -m switch that points to a filename which contains a (potentially long) tag message.

Bugs: Could alternatively be implemented via STDIN.
---
 cg-tag |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)
c9ed29a0eb1529a47af75a4193375edf9e892fdb
diff --git a/cg-tag b/cg-tag
--- a/cg-tag
+++ b/cg-tag
@@ -23,7 +23,7 @@
 #	This is most usually the ID of the commit to tag. Tagging
 #	other objects than commits is possible, but rather "unusual".
 
-USAGE="cg-tag [-d DESCRIPTION] [-s [-k KEYNAME]] TAG_NAME [OBJECT_ID]"
+USAGE="cg-tag [-d DESCRIPTION] [-m MSGFILE ] [-s [-k KEYNAME]] TAG_NAME [OBJECT_ID]"
 
 . ${COGITO_LIB}cg-Xlib || exit 1
 
@@ -37,6 +37,8 @@ while optparse; do
 		keyname="$OPTARG"
 	elif optparse -d=; then
 		description="$OPTARG"
+	elif optparse -m=; then
+		msgfile="$OPTARG"
 	else
 		optfail
 	fi
@@ -72,6 +74,13 @@ if [ "$description" ]; then
 	echo >>"$tagdir/tag"
 	echo "$description" >>"$tagdir/tag"
 fi
+if [ "$msgfile" ]; then
+	if [ ! -r $msgfile ]; then
+		rm -rf "$tagdir"
+		die "error signing the tag: cannot read $msgfile"
+	fi
+	cat $msgfile >>"$tagdir/tag"
+fi
 if [ "$sign" ]; then
 	echo >>"$tagdir/tag"
 	if ! gpg ${keyname:+--default-key "$keyname"} -bsa "$tagdir/tag"; then
Next: Linus Torvalds
Message 1 of 3 in “cg-tag - add support for longer commit messages”
  1. cg-tag - add support for longer commit messagesMartin Langhoff, Oct 11, 2005
  2. Linus TorvaldsOct 11, 2005
  3. Petr BaudisOct 11, 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.