git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Running vimdiff in read-only mode with git-difftool?
@ 2009-05-18  5:01 Nick Welch
  2009-05-18  5:42 ` David Aguilar
  2009-05-18  5:51 ` David Aguilar
  0 siblings, 2 replies; 4+ messages in thread
From: Nick Welch @ 2009-05-18  5:01 UTC (permalink / raw)
  To: git

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?

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-05-18  6:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-18  5:01 Running vimdiff in read-only mode with git-difftool? Nick Welch
2009-05-18  5:42 ` David Aguilar
2009-05-18  5:51 ` David Aguilar
2009-05-18  6:06   ` Nick Welch

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).