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?