{"thread":{"id":"2068","subject":"[PATCH] cg-tag - add support for longer commit messages","startedAt":"2005-10-11T02:45:49Z","lastAt":"2005-10-11T23:39:40Z","messageCount":3,"participants":["Martin Langhoff","Linus Torvalds","Petr Baudis"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"9944","messageId":"11289987493327-git-send-email-martin@catalyst.net.nz","threadId":"2068","inReplyTo":null,"subject":"[PATCH] cg-tag - add support for longer commit messages","fromName":"Martin Langhoff","fromEmail":"martin@catalyst.net.nz","sentAt":"2005-10-11T02:45:49Z","receivedAt":"2005-10-11T02:45:49Z","isPatch":true,"sender":{"key":"martin@laptop.org","avatar":null},"body":"Added an -m switch that points to a filename which contains a (potentially\nlong) tag message.\n\nBugs: Could alternatively be implemented via STDIN.\n\n---\n\n cg-tag |   11 ++++++++++-\n 1 files changed, 10 insertions(+), 1 deletions(-)\n\nc9ed29a0eb1529a47af75a4193375edf9e892fdb\ndiff --git a/cg-tag b/cg-tag\n--- a/cg-tag\n+++ b/cg-tag\n@@ -23,7 +23,7 @@\n #\tThis is most usually the ID of the commit to tag. Tagging\n #\tother objects than commits is possible, but rather \"unusual\".\n \n-USAGE=\"cg-tag [-d DESCRIPTION] [-s [-k KEYNAME]] TAG_NAME [OBJECT_ID]\"\n+USAGE=\"cg-tag [-d DESCRIPTION] [-m MSGFILE ] [-s [-k KEYNAME]] TAG_NAME [OBJECT_ID]\"\n \n . ${COGITO_LIB}cg-Xlib || exit 1\n \n@@ -37,6 +37,8 @@ while optparse; do\n \t\tkeyname=\"$OPTARG\"\n \telif optparse -d=; then\n \t\tdescription=\"$OPTARG\"\n+\telif optparse -m=; then\n+\t\tmsgfile=\"$OPTARG\"\n \telse\n \t\toptfail\n \tfi\n@@ -72,6 +74,13 @@ if [ \"$description\" ]; then\n \techo >>\"$tagdir/tag\"\n \techo \"$description\" >>\"$tagdir/tag\"\n fi\n+if [ \"$msgfile\" ]; then\n+\tif [ ! -r $msgfile ]; then\n+\t\trm -rf \"$tagdir\"\n+\t\tdie \"error signing the tag: cannot read $msgfile\"\n+\tfi\n+\tcat $msgfile >>\"$tagdir/tag\"\n+fi\n if [ \"$sign\" ]; then\n \techo >>\"$tagdir/tag\"\n \tif ! gpg ${keyname:+--default-key \"$keyname\"} -bsa \"$tagdir/tag\"; then\n"},{"id":"9961","messageId":"Pine.LNX.4.64.0510110754110.14597@g5.osdl.org","threadId":"2068","inReplyTo":"11289987493327-git-send-email-martin@catalyst.net.nz","subject":"Re: [PATCH] cg-tag - add support for longer commit messages","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2005-10-11T14:57:16Z","receivedAt":"2005-10-11T14:57:16Z","isPatch":true,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Tue, 11 Oct 2005, Martin Langhoff wrote:\n>\n> Added an -m switch that points to a filename which contains a (potentially\n> long) tag message.\n\nAt least core git has \"-m 'message'\" and \"-F 'file'\" (with long versions \nbeing \"--message\" and \"--file\" respectively) for this kind of thing in \n\"git commit\". Maybe it would be good to make that the standard interface.\n\nWhen scripting, using a separate file is often inconvenient, and giving \nthe message as an argument much nicer. So you do often want both.\n\n\t\tLinus\n"},{"id":"9984","messageId":"20051011233940.GJ30889@pasky.or.cz","threadId":"2068","inReplyTo":"11289987493327-git-send-email-martin@catalyst.net.nz","subject":"Re: [PATCH] cg-tag - add support for longer commit messages","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2005-10-11T23:39:40Z","receivedAt":"2005-10-11T23:39:40Z","isPatch":true,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Tue, Oct 11, 2005 at 04:45:49AM CEST, I got a letter\nwhere Martin Langhoff <martin@catalyst.net.nz> told me that...\n> Added an -m switch that points to a filename which contains a (potentially\n> long) tag message.\n> \n> Bugs: Could alternatively be implemented via STDIN.\n\nHmm. Well, the '-d' option is silly and that's really what should read\nas '-m', to keep it the same as cg-commit. Actually, I'd like to have it\nas similar as possible, so it would be ideal to have cg-tag do something\nlike\n\n\tif got_argument '-e'; then\n\t\tif tty -s; then\n\t\t\tthrow_together_some_CG:_stuff\n\t\t\t$EDITOR\n\t\t\tparse_the_CG:_stuff\n\t\telse\n\t\t\tcat >>logmsg\n\t\tfi\n\tfi\n\nto keep it symmetric to cg-commit (except that it won't require the\nmessage if you don't bother to pass it anything). Well, I guess the CG:\nstuff parsing is lower priority (and would require some factoring out of\nthe common code from cg-commit), so I'll do the simple part soon\n(today or on Thursday) if noone does it first. *hint* *hint* ;-)\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\nVI has two modes: the one in which it beeps and the one in which\nit doesn't.\n"}]}