From: Nick Welch <nick@incise.org>
To: git@vger.kernel.org
Subject: Running vimdiff in read-only mode with git-difftool?
Date: Sun, 17 May 2009 22:01:02 -0700 [thread overview]
Message-ID: <9e00fd550905172201n6c95dc1bia48c9ac25d8ec98f@mail.gmail.com> (raw)
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?
next reply other threads:[~2009-05-18 5:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-18 5:01 Nick Welch [this message]
2009-05-18 5:42 ` Running vimdiff in read-only mode with git-difftool? David Aguilar
2009-05-18 5:51 ` David Aguilar
2009-05-18 6:06 ` Nick Welch
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=9e00fd550905172201n6c95dc1bia48c9ac25d8ec98f@mail.gmail.com \
--to=nick@incise.org \
--cc=git@vger.kernel.org \
/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).