Closed opatut closed 8 years ago
After a bit of research, it seems not even the "branch" substring must be present in the git generated message. Only the /^Merge/
is hard-coded into git-fmt-merge-msg
, see fmt-merge-msg.c:418.
Hence, the regex might need to be very permissive in order to prevent false negatives. Though I expect people will sometimes start their message with "Merge " manually, even if it is not a merge commit. Do you prefer false postives or false negatives? ;)
We could consider a configuration option, e.g.:
"mergeRegex": "permissive|restrictive|<regex>",
My git generates the following message:
This does not fit the current pattern
/^Merge branch \'.*\' .*$/
. Can we change it to/^Merge (remote-tracking )?branch \'.*\' .*$/
or even/^Merge.*branch \'.*\' .*$/
?