git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Charles BaileyNext: Steffen Prohaska
Message 4 of 16 in “Teach git mergetool to use custom commands defined at config time”
  1. Teach git mergetool to use custom commands defined at config timeCharles Bailey, Feb 16, 2008
  2. Junio C HamanoFeb 16, 2008
  3. Charles BaileyFeb 16, 2008
  4. Jakub NarebskiFeb 16, 2008
  5. Steffen ProhaskaFeb 16, 2008
  6. Charles BaileyFeb 17, 2008
  7. Johannes SchindelinFeb 17, 2008
  8. Charles BaileyFeb 17, 2008
  9. Junio C HamanoFeb 17, 2008
  10. Steffen ProhaskaFeb 17, 2008
  11. Charles BaileyFeb 17, 2008
  12. Theodore TsoFeb 17, 2008
  13. Charles BaileyFeb 17, 2008
  14. Charles BaileyFeb 17, 2008
  15. Junio C HamanoFeb 18, 2008
  16. Charles BaileyFeb 18, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.