Re: Running vimdiff in read-only mode with git-difftool?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



As soon as I got your first reply, I started digging and managed to
figure out the $LOCAL and $REMOTE part.

Another interesting issue is that vim doesn't syntax-highlight the temp
file, because the file extension hasn't been carried over to the temp
file's filename.  I might see if I can figure out how to hack git to
do that.

Thanks for the help.

Nick


On Sun, May 17, 2009 at 10:51 PM, David Aguilar <davvid@xxxxxxxxx> wrote:
> On Sun, May 17, 2009 at 10:01:02PM -0700, Nick Welch wrote:
>> I'm running:
>>
>> git difftool -y --tool=vimdiff -U99999 --patience
>>
>> and I have the following in ~/.gitconfig:
>>
>> [difftool "vimdiff"]
>>     cmd = "vimdiff -R"
>
> I forgot to mention a couple of things.
>
>
> If you do change that to e.g. "myvimdiff" you'll need
> the $LOCAL and $REMOTE params as well; probably something
> like:
>
> [difftool "myvimdiff"]
>        cmd = vim -R -d -c wincmd l \"$LOCAL\" \"$REMOTE\"
>
>
> $ git difftool -y -t myvimdiff
>
>
> Secondly, git-difftool receives both the pre and post-image
> and doesn't actually receive the output of git-diff, so passing
> --patience unfortunately won't do what you're expecting it to
> do.  Piping the output of git-diff to something like kompare(?)
> is probably the only way to get the nice --patience result.
>
> It'd be nice if all diff/merge tools supported the patience
> diff algorithm but that's not the case right now.
>
> --
>
>        David
>
>
>
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]