]> git.ipfire.org Git - thirdparty/git.git/commit - Documentation/config/fmt-merge-msg.txt
fmt-merge-msg: allow merge destination to be omitted again
authorJunio C Hamano <gitster@pobox.com>
Wed, 29 Jul 2020 22:50:01 +0000 (15:50 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 30 Jul 2020 19:43:10 +0000 (12:43 -0700)
commit6e6029a82acdb3d785eef15dc798f4d86c4ea445
treeddca4033ffaca8df143cb20e918d045b15228587
parent21531927e4e1b9fdf524983414ee59558cb4f3d6
fmt-merge-msg: allow merge destination to be omitted again

In Git 2.28, we stopped special casing 'master' when producing the
default merge message by just removing the code to squelch "into
'master'" at the end of the message.

Introduce multi-valued merge.suppressDest configuration variable
that gives a set of globs to match against the name of the branch
into which the merge is being made, to let users specify for which
branch fmt-merge-msg's output should be shortened.  When it is not
set, 'master' is used as the sole value of the variable by default.

The above move mostly reverts the pre-2.28 default in repositories
that have no relevant configuration.

Add a few tests to protect the behaviour with the new configuration
variable from future regression.

Helped-by: Linus Torvalds <torvalds@linux-foundation.org>
Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/config/fmt-merge-msg.txt
fmt-merge-msg.c
t/t6200-fmt-merge-msg.sh