git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Evgeny <evgeny.zislis@gmail.com>
To: "Charles Bailey" <charles@hashpling.org>
Cc: "David Aguilar" <davvid@gmail.com>, tytso@mit.edu, git@vger.kernel.org
Subject: Re: [PATCH] mergetool: export variables for use by custom mergetools
Date: Sun, 18 May 2008 02:55:10 +0300	[thread overview]
Message-ID: <b6840c770805171655y691fbd0vd2d65d0914757b63@mail.gmail.com> (raw)
In-Reply-To: <20080517233414.GA28196@hashpling.org>

Ohh, so the documentation is not clear then. Now that you say it this
way, I finally understant that I should have in my ~/.gitconfig
something like:

[mergetool "p4merge"]
	cmd = p4merge.sh "$PWD/$BASE" "$PWD/$REMOTE" "$PWD/$LOCAL" "$PWD/$MERGED"
	keepBackup = false

[merge]
	tool = p4merge


Thanks for the explanation!
I believe that an example in the documentation could be a nice
addition, to clear things up in the future.

PS: The latest version of P4Merge did not work without the $PWD/
(fullpath). strange, but an older version worked okay even without it.


No patch is needed -- all is great, thank you great people! :)

Thank you Charles!



-
Evgeny


On Sun, May 18, 2008 at 2:34 AM, Charles Bailey <charles@hashpling.org> wrote:
> On Sat, May 17, 2008 at 01:39:26PM -0700, David Aguilar wrote:
>> The MERGED, BACKUP, LOCAL, REMOTE and BASE variables were not being
>> exported from the git-mergetool.sh script.  This prevented custom
>> mergetools from being able to use them.
>>
>> We now export them so that arbitrary mergetools can easily interact
>> with git mergetool.
>>
>> This problem was Reported-By: Evgeny <evgeny.zislis@gmail.com>
>>
>> Signed-off-by: David Aguilar <davvid@gmail.com>
>
> I think there must be a misunderstanding here. The variables are not
> designed to be exported. The point of the custom merge tool patch to
> git mergetool was to support custom mergetools without the need for a
> wrapper script, just a git config variable.
>
> I know that (with the right config) git mergetool supports p4merge as
> it is one of a selection of tools that I tested it with. You should be
> able to get p4 merge to work by setting the config variable:
>
> mergetool.p4merge.cmd
>
> to the value (IIRC, and I don't have the p4merge documentation to hand):
>
> p4merge "$BASE" "$REMOTE" "$LOCAL" "$MERGED"
>
> Getting the quoting correct on this depends on whether you set it via
> commandline or via editing a git config file and can be a little
> tricky.
>
> If you have a wrapper shell script then you can easily pass these as
> positional parameters and re-export them as necessary.
>
> --
> Charles Bailey
> http://ccgi.hashpling.plus.com/blog/
>

  reply	other threads:[~2008-05-17 23:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-17 20:39 [PATCH] mergetool: export variables for use by custom mergetools David Aguilar
2008-05-17 23:34 ` Charles Bailey
2008-05-17 23:55   ` Evgeny [this message]
2008-05-18  0:07     ` Charles Bailey
2008-05-18  0:12       ` Evgeny

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b6840c770805171655y691fbd0vd2d65d0914757b63@mail.gmail.com \
    --to=evgeny.zislis@gmail.com \
    --cc=charles@hashpling.org \
    --cc=davvid@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).