nvie / gitflow

Git extensions to provide high-level repository operations for Vincent Driessen's branching model.

Home Page:http://nvie.com/posts/a-successful-git-branching-model/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multiline release tag messages cause problems

shaedrich opened this issue · comments

I was unable to use gitflow to include release notes/a change log. This is what I tried:

git flow release finish 1.0.0 --pushdevelop --pushtag --pushproduction -m "Tagging 1.0.0
>>
>> # [CHANGED]
>> - Something has changed
>>
>> # [FIXED]
>> - Something has been fixed"

Multiple -m don't work either:

git flow release finish 1.0.0 --pushdevelop --pushtag --pushproduction -m "Tagging 1.0.0" -m "# [CHANGED]
>> - Something has changed
>>
>> # [FIXED]
>> - Something has been fixed"

Solution

add -subject and -body to your command:
https://github.com/nvie/gitflow/blob/develop/git-flow-release#L251:

			[ "$FLAGS_message" != "" ] && opts="$opts -m '$FLAGS_message'"
			[ "$FLAGS_subject" != "" && "$FLAGS_body" ] && opts="$opts -m '$FLAGS_subject' -m '$FLAGS_body'"

Another solution would be to fix whatever causes strange results with multiline tag messages