Re: [PATCH v2] mergetool: support setting path to tool as config var mergetool.<tool>.path
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Oct 10, 2007, 14:33 UTC
- Message-ID
- <Pine.LNX.4.64.0710101526060.4174@racer.site>
- In-Reply-To
- <11919632613176-git-send-email-prohaska@zib.de>
Hi,
On Tue, 9 Oct 2007, Steffen Prohaska wrote:
Show 5 quoted lines
> This commit adds a mechanism to provide absolute paths to the external > programs called by 'git mergetool'. A path can be specified in the > configuation variable mergetool.<tool>.path. The configuration variable > is similar to how we name branches and remotes. It is extensible if we > need to specify more details about a tool.
Okay, let's step back a bit.
What does mergetool do? It calls different merge helpers, each with its own convention how to call it. For example, tkdiff is called either as
tkdiff -a "$BASE" -o "$path" -- "$LOCAL" "$REMOTE"
or as
tkdiff -o "$path" -- "$LOCAL" "$REMOTE"
depending if there is a base or not. Another example is gvimdiff:
gvimdiff -f -- "$LOCAL" "$path" "$REMOTE"
which seems not to care if there is a base.
Now, would it not be much better if we had a way to specify the tool and the convention indepentently? Like
merge.tkdiff.path = C:\bla\blub\wish.exe C:\blub\bleh\tkdiff.tcl merge.tkdiff.options = -o %p -- %l %r merge.tkdiff.optionsWithBase = -a %b -o %p -- %l %r
and have defaults for the tools we have in git-mergetool.sh _already_?
Ciao, Dscho