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

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

 



I'm running:

git difftool -y --tool=vimdiff -U99999 --patience

and I have the following in ~/.gitconfig:

[difftool "vimdiff"]
    cmd = "vimdiff -R"

But vimdiff is still run in read/write mode.  In the output of ps, I see:

vim -d -c wincmd l /tmp/.diff_bP2Tjf <original file>

There should be an -R in there, but there's not.  And if I'm trying to
edit <original file> in another instance of vim, I get the annoying "a swap
file exists, what should I do?" message, which is my main motivation in
trying to use read-only mode.

According to the git-difftool manpage, what I'm trying to do should work:

    Instead of running one of the known diff tools, git-difftool can be
    customized to run an alternative program by specifying the command line to
    invoke in a configuration variable difftool.<tool>.cmd.

I've also tried specifying the full path to vim diff, like this:

[difftool "vimdiff"]
    cmd = "/usr/bin/vimdiff -R"

and it didn't work either.

Any ideas?
--
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]