Objective
Create an annotated tag with an empty message, as would be created with the following command.
$ git tag --annotate epic-tag --message=""
Attempts
- Create it with
M-x magit-tag<RET> -a t tag-name<RET> <RET> C-c C-c
. This does not work, because git interprets no message specified interactively as don't create tag, resulting in the following in the magit-process buffer.
...
git … tag --annotate tag-name master
hint: Waiting for your editor to close the file...
Waiting for Emacs...
fatal: no tag message?
Add argument
--message=
tomagit-tag
. I added a--message=
argument tomagit-tag
(see branch or patch), but when I try using my argument with an empty value it interprets it as cancelling the argument. Using '' or "" as a value literally uses '' or "" for the tag message.Add a "virtual argument"
-e
that adds--message=''
to the command. That also used '' as a literal tag message. See branch or patch.
Anti-solutions
- Use lightweight tags. The tags must be annotated because they are meant for release*.
* Annotated tags are meant for release while lightweight tags are meant for private or temporary object labels. - GIT-TAG(1)