nvie/gitflow — pull request #200 by conf (2012-03-13 22:04:55+00:00)
Title: Added options (-m and -a) on feature finish action that allow to change default merge message.

Those are:
- custom merge message option (-m)
- custom appended message to a default merge message (-a)
- default addition to -a option via git config option gitflow.feature.finish.append.

Why is this needed?
Some (maybe many) bugtrackers allow closing issues by mentioning them in the commit messages, like `#VM-123 fixed`. That's cool and we like do that. But in our company before closing task the code (a branch) should pass code review. So it would be convenient to automatically add some text into a merge message when branch is merged into mainstream (develop), so task can be closed.

How to test:
Create test repo with the following:
`mkdir /tmp/repo; cd /tmp/repo; git flow init -d; git config gitflow.feature.finish.append "#VM-$(echo $BRANCH | grep -oP "\d+") fixed"; touch README; git add . ; git commit -m "initial commit"`

As you may noted, config option will be `eval`uated on run, so user basically can use some template logic based on branch-name, that's very convenient.

Test fast-forward merges with following:
`git flow feature start vm-1234-test; echo commit >> README ; git commit -am 'commit'; git flow feature finish; git log --shortstat -n 1`
You should see git flow output and something like that in the end:
`commit 3d9039fb58bf05537ca9de00052d4d20570783a2
Author: Shein Alexey
Date: Wed Mar 14 02:55:36 2012 +0500

commit
#VM-1234 fixed

1 files changed, 1 insertions(+), 0 deletions(-)`
Note #VM-1234 fixed, that was added by my patch.

Test recursive merges with following:
`git flow feature start vm-1234-test; echo commit >> README ; git commit -am 'commit'; echo commit >> README ; git commit -am 'commit'; echo commit >> README ; git commit -am 'commit'; git flow feature finish; git log --shortstat -n 1`
You should see git flow output and something like that:
`commit eb527929d89fc1f0b137664c8077f05f5a74dd72
Merge: 3d9039f 319cb16
Author: Shein Alexey
Date: Wed Mar 14 02:57:25 2012 +0500

Merge branch feature/vm-1234-test into develop.
#VM-1234 fixed

commit 319cb16e5f4a2d4e15c3b8283a4a6c0846760a77`

You can also specify custom merge message via -m option and append message via -a option if you need some more flexibility.