{"thread":{"id":"13556","subject":"git mergetool","startedAt":"2008-05-17T17:21:03Z","lastAt":"2008-05-17T21:32:25Z","messageCount":4,"participants":["Evgeny","Jakub Narebski","David Aguilar"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"77196","messageId":"b6840c770805171021g63df7d0dm4532655ed49209bc@mail.gmail.com","threadId":"13556","inReplyTo":null,"subject":"git mergetool","fromName":"Evgeny","fromEmail":"evgeny.zislis@gmail.com","sentAt":"2008-05-17T17:21:03Z","receivedAt":"2008-05-17T17:21:03Z","isPatch":false,"sender":{"key":"evgeny.zislis@gmail.com","avatar":"https://gravatar.com/avatar/b2ebd794721c2632b56a50c51c93899ee97de11defaeabf26139d173210489ea?d=mp&s=160"},"body":"Hello Git developers,\nand especially Theodore (whos email is in the footer of man git-mergetool)\n\nBackground:\n   I am trying to use a custom mergetool with git.\n   P4Merge from http://www.perforce.com/perforce/products/merge.html\n\n   The documentation explains that environment variables $BASE,\n$LOCAL, $REMOTE, $MERGED\n   are set for the invocation of the mergetool command.\n\nProblem:\n   I wrote a wrapper for P4Merge, and I check for these environment\nvariables - but they are not there.\n   After a closer inspection of git-mergetool I see that infact these\nvariables are not being sent to the\n   external command at all, and are just in the context of the\ngit-mergetool script.\n\nSolution:\n   There are two ways, that i know of, to make the executed command\nreceive these variables :\n     1. use \"export\" on them\n     2. use \"env LOCAL=$LOCAL env REMOTE=$REMOTE ....  $extcommand\" to\nset an environment for just that command\n\nMy System Information:\n   git 1.5.5.1  (from macports)\n   Mac OS X 10.5.2\n\nHopefully this will get fixed in future versions, so I wont need to\npatch git-mergetool locally on my machine with every update.\n\nRegards,\nEvgeny\n"},{"id":"77202","messageId":"m3tzgw4r7w.fsf@localhost.localdomain","threadId":"13556","inReplyTo":"b6840c770805171021g63df7d0dm4532655ed49209bc@mail.gmail.com","subject":"Re: git mergetool","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2008-05-17T20:21:10Z","receivedAt":"2008-05-17T20:21:10Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Evgeny <evgeny.zislis@gmail.com> writes:\n\n> Background:\n>    I am trying to use a custom mergetool with git.\n>    P4Merge from http://www.perforce.com/perforce/products/merge.html\n> \n>    The documentation explains that environment variables \n>    $BASE, $LOCAL, $REMOTE, $MERGED\n>    are set for the invocation of the mergetool command.\n> \n> Problem:\n>    I wrote a wrapper for P4Merge, and I check for these environment\n>    variables - but they are not there.   After a closer inspection\n>    of git-mergetool I see that infact these variables are not being\n>    sent to the external command at all, and are just in the context\n>    of the git-mergetool script.\n\n>From what I know of git-mergetool, you can use one of the predefined\nmerge tools: kdiff3, tkdiff, meld, xxdiff, emerge, vimdiff, gvimdiff,\necmerge, and opendiff (optionally providing path to the tool)\n\nTo add support for P4Merge you would have either modify\ngit-mergetool.sh (and, optionally, send a patch to git mailing list),\nor make use of `mergetool.<tool>.cmd` configuration option.\nUnfortunately there is no example...\n\n-- \nJakub Narebski\nPoland\nShadeHawk on #git\n"},{"id":"77205","messageId":"402731c90805171347g62197f5diab513e409d7cce25@mail.gmail.com","threadId":"13556","inReplyTo":"m3tzgw4r7w.fsf@localhost.localdomain","subject":"Re: git mergetool","fromName":"David Aguilar","fromEmail":"davvid@gmail.com","sentAt":"2008-05-17T20:47:41Z","receivedAt":"2008-05-17T20:47:41Z","isPatch":false,"sender":{"key":"davvid@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13196?v=4"},"body":"On Sat, May 17, 2008 at 1:21 PM, Jakub Narebski <jnareb@gmail.com> wrote:\n> Evgeny <evgeny.zislis@gmail.com> writes:\n>\n>> Background:\n>>    I am trying to use a custom mergetool with git.\n>>    The documentation explains that environment variables\n>>    $BASE, $LOCAL, $REMOTE, $MERGED\n>>    are set for the invocation of the mergetool command.\n>>\n>> Problem:\n>>    I wrote a wrapper for P4Merge, and I check for these environment\n>>    variables - but they are not there.   After a closer inspection\n>>    of git-mergetool I see that infact these variables are not being\n>>    sent to the external command at all, and are just in the context\n>>    of the git-mergetool script.\n>\n> From what I know of git-mergetool, you can use one of the predefined\n> merge tools: kdiff3, tkdiff, meld, xxdiff, emerge, vimdiff, gvimdiff,\n> ecmerge, and opendiff (optionally providing path to the tool)\n>\n> To add support for P4Merge you would have either modify\n> git-mergetool.sh (and, optionally, send a patch to git mailing list),\n> or make use of `mergetool.<tool>.cmd` configuration option.\n> Unfortunately there is no example...\n>\n> --\n> Jakub Narebski\n> Poland\n> ShadeHawk on #git\n\nI just sent a patch that exports these variables.\n\nPresumably we do not want to modify git-mergetool.sh every single time\nsomeone needs to be able to use a new mergetool, hence the patch I\nsent makes sense to me.  Let me know if you think otherwise.\nThanks,\n-- \n David\n"},{"id":"77209","messageId":"b6840c770805171432g7d1ea462y7ae09aff733eb6a9@mail.gmail.com","threadId":"13556","inReplyTo":"402731c90805171347g62197f5diab513e409d7cce25@mail.gmail.com","subject":"Re: git mergetool","fromName":"Evgeny","fromEmail":"evgeny.zislis@gmail.com","sentAt":"2008-05-17T21:32:25Z","receivedAt":"2008-05-17T21:32:25Z","isPatch":false,"sender":{"key":"evgeny.zislis@gmail.com","avatar":"https://gravatar.com/avatar/b2ebd794721c2632b56a50c51c93899ee97de11defaeabf26139d173210489ea?d=mp&s=160"},"body":"I was in fact using mergetool.p4merge.cmd ... and the documentation explains\nregarding the non-working environment variables.\n\nHopefully with the new patch it will work okay.\n\nThanks David!\n\n--\nEvgeny\n\nOn Sat, May 17, 2008 at 11:47 PM, David Aguilar <davvid@gmail.com> wrote:\n> On Sat, May 17, 2008 at 1:21 PM, Jakub Narebski <jnareb@gmail.com> wrote:\n>> Evgeny <evgeny.zislis@gmail.com> writes:\n>>\n>>> Background:\n>>>    I am trying to use a custom mergetool with git.\n>>>    The documentation explains that environment variables\n>>>    $BASE, $LOCAL, $REMOTE, $MERGED\n>>>    are set for the invocation of the mergetool command.\n>>>\n>>> Problem:\n>>>    I wrote a wrapper for P4Merge, and I check for these environment\n>>>    variables - but they are not there.   After a closer inspection\n>>>    of git-mergetool I see that infact these variables are not being\n>>>    sent to the external command at all, and are just in the context\n>>>    of the git-mergetool script.\n>>\n>> From what I know of git-mergetool, you can use one of the predefined\n>> merge tools: kdiff3, tkdiff, meld, xxdiff, emerge, vimdiff, gvimdiff,\n>> ecmerge, and opendiff (optionally providing path to the tool)\n>>\n>> To add support for P4Merge you would have either modify\n>> git-mergetool.sh (and, optionally, send a patch to git mailing list),\n>> or make use of `mergetool.<tool>.cmd` configuration option.\n>> Unfortunately there is no example...\n>>\n>> --\n>> Jakub Narebski\n>> Poland\n>> ShadeHawk on #git\n>\n> I just sent a patch that exports these variables.\n>\n> Presumably we do not want to modify git-mergetool.sh every single time\n> someone needs to be able to use a new mergetool, hence the patch I\n> sent makes sense to me.  Let me know if you think otherwise.\n> Thanks,\n> --\n>  David\n>\n"}]}