Git development
 help / color / mirror / Atom feed
From: Martin Langhoff <martin@catalyst.net.nz>
To: git@vger.kernel.org
Cc: Martin Langhoff <martin@catalyst.net.nz>
Subject: [PATCH] cg-tag - add support for longer commit messages
Date: Tue, 11 Oct 2005 15:45:49 +1300	[thread overview]
Message-ID: <11289987493327-git-send-email-martin@catalyst.net.nz> (raw)
In-Reply-To: 

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

             reply	other threads:[~2005-10-11  2:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-11  2:45 Martin Langhoff [this message]
2005-10-11 14:57 ` [PATCH] cg-tag - add support for longer commit messages Linus Torvalds
2005-10-11 23:39 ` Petr Baudis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=11289987493327-git-send-email-martin@catalyst.net.nz \
    --to=martin@catalyst.net.nz \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox