nvie / gitflow

Git extensions to provide high-level repository operations for Vincent Driessen's branching model.
http://nvie.com/posts/a-successful-git-branching-model/
Other
26.6k stars 2.66k forks source link

Multiline release tag messages cause problems #6475

Open shaedrich opened 2 years ago

shaedrich commented 2 years ago

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