threads / discuss / 28750

git mergetool ignores configured command line

Subject: git mergetool ignores configured command line

## tl;dr

4 messages between Oct 23, 2011 and Oct 23, 2011.

replies: 3people: 4as markdown or json

Alexander Vladimirov· Oct 23, 2011, 04:43 UTC · lore

To configure diffuse as merge tool I set mergetool configuration using following commands:

git config --global merge.tool diffuse git config --global mergetool.diffuse.cmd '/usr/bin/diffuse "$LOCAL" "$MERGED" "$REMOTE"'

Then, when I invoke mergetool during merge, I get diffuse with four panes open as by default, instead of three specified in command line setting. Is this an expected behavior, and how can I force mergetool to use provided command line?

Andreas Schwab· Oct 23, 2011, 08:37 UTC · re: Alexander Vladimirov · lore

Re: git mergetool ignores configured command line

Alexander Vladimirov <alexander.idkfa.vladimirov@gmail.com> writes:
Show 12 quoted lines
> To configure diffuse as merge tool I set mergetool configuration using
> following commands:
>
> git config --global merge.tool diffuse
> git config --global mergetool.diffuse.cmd '/usr/bin/diffuse "$LOCAL"
> "$MERGED" "$REMOTE"'
>
> Then, when I invoke mergetool during merge, I get diffuse with four
> panes open as by default, instead of three specified in command line
> setting.
> Is this an expected behavior, and how can I force mergetool to use
> provided command line?

diffuse is already a predefined merge tool, so mergetool.diffuse.cmd is ignored. Try using a different name.

Andreas.
-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."
Junio C Hamano· Oct 23, 2011, 09:52 UTC · re: Andreas Schwab · lore

Re: git mergetool ignores configured command line

Andreas Schwab <schwab@linux-m68k.org> writes:
> diffuse is already a predefined merge tool, so mergetool.diffuse.cmd is
> ignored.  Try using a different name.
I wonder if we can improve this, though.

It is nice that we give canned definition of argument order to so many obscure tools, but instead of ignoring mergetool.<tool>.cmd when the user told us to use <tool>, couldn't we simply ignore what we have internally as canned definition?

Even if such a change were too intrusive (I didn't check), could we have a decency to at least warn that we are ignoring the configuration?

David Aguilar· Oct 23, 2011, 10:35 UTC · re: Junio C Hamano · lore

Re: git mergetool ignores configured command line

On Sun, Oct 23, 2011 at 02:52:19AM -0700, Junio C Hamano wrote:
Show 14 quoted lines
> Andreas Schwab <schwab@linux-m68k.org> writes:
> 
> > diffuse is already a predefined merge tool, so mergetool.diffuse.cmd is
> > ignored.  Try using a different name.
> 
> I wonder if we can improve this, though.
> 
> It is nice that we give canned definition of argument order to so many
> obscure tools, but instead of ignoring mergetool.<tool>.cmd when the user
> told us to use <tool>, couldn't we simply ignore what we have internally
> as canned definition?
> 
> Even if such a change were too intrusive (I didn't check), could we have
> a decency to at least warn that we are ignoring the configuration?

I agree. Ideally, we should honor their configuration. I'll see if doing so is not too intrusive.

-- 
					David

← back to recent threads