bump2version icon indicating copy to clipboard operation
bump2version copied to clipboard

Handling custom tag messages with Git

Open Wieschie opened this issue 6 years ago • 9 comments

There's currently no support for creating annotated tags in Git without specifying the message. The git tag -a option will create an annotated tag and open the editor to write the tag message. This is useful when you may want to include a multiline message such as a change log. To do this currently, I have to use bumpversion and then overwrite the tag manually with Git.

I see it as an annotate_tags option that would be ignored for Mercurial repos, and override the default tag message, calling git tag -a instead of git tag -m. I'm happy to work on implementing this, but I wanted to check here first to make sure that it would be acceptable.

Wieschie avatar Dec 23 '18 21:12 Wieschie

git-tag has a fairly new argument, '--edit'.

Perhaps it's easier to add that rather than to strip out the existing -m argument.

florisla avatar Dec 24 '18 07:12 florisla

The --edit option is certainly nicer. It was introduced earlier this year in git 2.17. Are we worried about backwards portability here? Debian stable, for example, is still on git 2.11 - users would have to install a backport or upgrade to testing to be able to use this feature.

Wieschie avatar Dec 25 '18 02:12 Wieschie

I wonder if it's ugly to have some value for the message that it'd always prompt. For example on an empty string it'd pass -a instead of -m. On the other hand, users could be relying on that.

ekohl avatar Dec 25 '18 12:12 ekohl

You could use [annotate_interactive] as the special string?

florisla avatar Dec 25 '18 15:12 florisla

I was thinking about that or EDIT but it might be a bit too magical.

ekohl avatar Dec 25 '18 15:12 ekohl

On the other hand, this feature request can be solved by "allowing arbitrary arguments to git tag command", which sounds very similar to PR #47 ("allow arbitrary arguments to git commit command").

florisla avatar Jan 03 '19 20:01 florisla

Agree with @florisla, would rather not support another feature unless it's part of a more general design: "arbitrary args to git-tag and git-commit".

c4urself avatar Aug 24 '19 23:08 c4urself

If somebody were to implement this, it should be similar to #47.

florisla avatar Jan 14 '20 08:01 florisla

Hello there 👋

I would like to have a stab at this, getting inspiration from what has been done in #47. Is it something still wanted/relevant?

frankie567 avatar May 18 '22 09:05 frankie567