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
Steffen Prohaska <prohaska@zib.de>
Date
Feb 16, 2008, 22:37 UTC
Message-ID
<CD749541-1B3B-4EA7-82A5-0DFC67B953BE@zib.de>
In-Reply-To
<20080216185349.GA29177@hashpling.org>
On Feb 16, 2008, at 7:53 PM, Charles Bailey wrote:
Show 11 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 is a preliminary patch which aims to make it easier to use
> a.n.other 3-way merge tool with git-mergetool without either hacking
> the source or writing a wrapper script for the tool.

Why not just add the tools you have in mind to git mergetool? If everyone did that eventually we would have direct support for a rather long list of tools. This would be the easiest solution for the end user: He could just choose the preferred tool and use it. The invocation of each merge tool would be coded in mergetool. The exact command line could be fine tuned and would be reviewed by other git developers.

...
Show 8 quoted lines
> git config --global mergetool.tortoise.cmd 'TortoiseMerge.exe \
> /base:"$BASE" /theirs:"$REMOTE" /mine:"$LOCAL" /merged:"$path"'
>
> git config --global mergetool.p4.cmd 'p4merge.exe "$BASE" "$REMOTE" \
> "$LOCAL" "$path"'
>
> git config --global mergetool.p4win.cmd 'P4WinMrg "$BASE" "$REMOTE" \
> "$LOCAL" "$path"'

If you just integrated these tools directly I could use them right away instead of first reading the documentation of the custom mechanism and then looking up how to configure the right command line for the tool I want to use. If the tools were directly integrated I could for example just say "git mergetool --tool=p4".

That does not mean I am opposed to adding a mechanism for handling custom tools. But easier for the end user would be if the tools were directly integrated.

		Steffen
Previous: Jakub NarebskiNext: Charles Bailey
Message 5 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.