Re: [RFC/PATCH] Teach git mergetool to use custom commands defined at config time
- From
Jakub Narebski <jnareb@gmail.com>
- Date
- Feb 16, 2008, 21:11 UTC
- Message-ID
- <m3hcg8bo9f.fsf@localhost.localdomain>
- In-Reply-To
- <20080216185349.GA29177@hashpling.org>
Charles Bailey <charles@hashpling.org> writes:
Show 8 quoted lines
> Currently git mergetool is restricted to a set of commands defined > in the script. You can subvert the mergetool.<tool>.path to force > git mergetool to use a different command, but if you have a command > whose invocation syntax does not match one of the current tools then > you would have to write a wrapper script for it. > > This patch adds three git config variable patterns which allow a more > flexible choice of merge tool.
[...]
> It follows filter-branch's 'eval a user shell snippet' philosophy to > provide the flexibility and here in lies an ugliness. It exposes > git-mergetool.sh's private variables to the user script. The variables > are BASE, REMOTE, LOCAL and path.
Another solution would be to use StGit merger / i2merge / i3merge format, similar to git-for-each-ref format, namely to expand %(branch1), %(branch2), %(ancestor), %(output) (well, StGit uses for some reason %(ancestor)s etc.; git-for-each-ref doesn't).
Although for this would be better if git-mergetool was rewritten in C, in Perl (or even in Python).
-- Jakub Narebski Poland ShadeHawk on #git