From: Han-Wen Nienhuys Date: Wed, 15 Nov 2006 15:34:25 GMT Subject: git tag: don't complain of empty messages Message-ID: Hello, GIT refuses to set annotated tags without a comment. I think this is a silly restriction when the message is explicitly set to the empty string. The attached patch should fix this; Unfortunately, I've been unable to test it. Running the script with sh -x stops at ++exec /home/hanwen/usr/pkg/git/bin/git-sh-setup -- Han-Wen Nienhuys - hanwen@xs4all.nl - http://www.xs4all.nl/~hanwen commit 446cfbd9edcfaf5fe76f597823e0e3314d091489 Author: Han-Wen Nienhuys Date: Wed Nov 15 16:27:27 2006 +0100 always set tag if -m is given, even if empty diff --git a/git-tag.sh b/git-tag.sh index ac269e3..f2533a3 100755 --- a/git-tag.sh +++ b/git-tag.sh @@ -5,6 +5,7 @@ USAGE='-l [] | [-a | -s | -u "$GIT_DIR"/TAG_EDITMSG @@ -95,7 +97,7 @@ if [ "$annotate" ]; then grep -v '^#' <"$GIT_DIR"/TAG_EDITMSG | git-stripspace >"$GIT_DIR"/TAG_FINALMSG - [ -s "$GIT_DIR"/TAG_FINALMSG ] || { + [ -s "$GIT_DIR"/TAG_FINALMSG -o -n "$message_given" ] || { echo >&2 "No tag message?" exit 1 }