Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git flow release finish with a message that contains spaces

Tags:

git

git-flow

How can I provide a real message to git flow release finish?

This is what my attempt and it's output look like:

> git flow release finish -m 'Release 0.0.4 - Fixing a bug' 0.0.4
flags:FATAL the available getopt does not support spaces in options

The only way I can get it to work is when I don't use any spaces in the message.

like image 948
nicholaides Avatar asked Jan 25 '13 22:01

nicholaides


1 Answers

I have the same problem, but get a different error message:

$ git flow release finish -m 'Release 0.0.4 - Fixing a bug' 0.0.4
fatal: too many params
Tagging failed. Please run finish again to retry.

Managed to come up with a workaround that is quite ugly, but seems to work for me, which makes it possible to use in a script.

The idea is to:

  1. populate a file with the tag message
  2. set the git editor command to a simple move command (git provides us with the target destination)
  3. finish the git flow release
  4. unset the git editor command

Don't know which OS you are on, but here is the sequence I'm using on Ubuntu.

$ echo 'Release 0.0.4 - Fixing a bug' > .git/MY_TAGMSG
$ git config core.editor "mv .git/MY_TAGMSG"
$ git flow release finish 0.0.4
$ git config --unset core.editor
like image 179
Steinar Avatar answered Sep 22 '22 12:09

Steinar