merge: make branch.<name>.mergeoptions correctly override merge.<option>
commit0d8fc3efc65df74a2b39b3f9798861a1b2055b62
authorJunio C Hamano <gitster@pobox.com>
Thu, 5 May 2011 00:42:51 +0000 (4 17:42 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 6 May 2011 22:01:56 +0000 (6 15:01 -0700)
tree8dbec03b5d44bc2fde3a04d5a5ada030d515e9de
parente923eaeb901ff056421b9007adcbbce271caa7b6
merge: make branch.<name>.mergeoptions correctly override merge.<option>

The parsing of the additional command line parameters supplied to
the branch.<name>.mergeoptions configuration variable was implemented
at the wrong stage.  If any merge-related variable came after we read
branch.<name>.mergeoptions, the earlier value was overwritten.

We should first read all the merge.* configuration, override them by
reading from branch.<name>.mergeoptions and then finally read from
the command line.

This patch should fix it, even though I now strongly suspect that
branch.<name>.mergeoptions that gives a single command line that
needs to be parsed was likely to be an ill-conceived idea to begin
with.  Sigh...

Helped-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-merge.c
t/t7600-merge.sh