mergetool-lib: call vim in readonly mode for diffs
commit853c0ffe42fef0bd1abd5cc69d5e93fdd5a708aa
authorMichael J Gruber <git@drmicha.warpmail.net>
Fri, 25 Feb 2011 09:36:39 +0000 (25 10:36 +0100)
committerJunio C Hamano <gitster@pobox.com>
Fri, 25 Feb 2011 20:00:28 +0000 (25 12:00 -0800)
tree642ce419edc2156230be962f95aea9c7e49daf3e
parent7ed863a85a6ce2c4ac4476848310b8f917ab41f9
mergetool-lib: call vim in readonly mode for diffs

When [g]vimdiff is called for files which are opened already, the editor
complains about the existing swap file. But we do not want to write
anything when called from difftool. So, make difftool use "-R" for the
vim family. This

- prevents the use of a swap file and
- marks the buffers readonly.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-mergetool--lib.sh