From: Jakub Narebski Date: Sat, 16 Feb 2008 21:11:59 GMT Subject: Re: [RFC/PATCH] Teach git mergetool to use custom commands defined at config time Message-ID: In-Reply-To: <20080216185349.GA29177@hashpling.org> Charles Bailey writes: > Currently git mergetool is restricted to a set of commands defined > in the script. You can subvert the mergetool..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