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

Re: git mergetool

From
Jakub Narebski <jnareb@gmail.com>
Date
May 17, 2008, 20:21 UTC
Message-ID
<m3tzgw4r7w.fsf@localhost.localdomain>
In-Reply-To
<b6840c770805171021g63df7d0dm4532655ed49209bc@mail.gmail.com>
Evgeny <evgeny.zislis@gmail.com> writes:
Show 14 quoted lines
> Background:
>    I am trying to use a custom mergetool with git.
>    P4Merge from http://www.perforce.com/perforce/products/merge.html
> 
>    The documentation explains that environment variables 
>    $BASE, $LOCAL, $REMOTE, $MERGED
>    are set for the invocation of the mergetool command.
> 
> Problem:
>    I wrote a wrapper for P4Merge, and I check for these environment
>    variables - but they are not there.   After a closer inspection
>    of git-mergetool I see that infact these variables are not being
>    sent to the external command at all, and are just in the context
>    of the git-mergetool script.
>From what I know of git-mergetool, you can use one of the predefined

merge tools: kdiff3, tkdiff, meld, xxdiff, emerge, vimdiff, gvimdiff, ecmerge, and opendiff (optionally providing path to the tool)

To add support for P4Merge you would have either modify git-mergetool.sh (and, optionally, send a patch to git mailing list), or make use of `mergetool.<tool>.cmd` configuration option. Unfortunately there is no example...

-- 
Jakub Narebski
Poland
ShadeHawk on #git
Previous: EvgenyNext: David Aguilar
Message 2 of 4 in “git mergetool”
  1. EvgenyMay 17, 2008
  2. Jakub NarebskiMay 17, 2008
  3. David AguilarMay 17, 2008
  4. EvgenyMay 17, 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.