--- Begin Message ---
Subject: |
Diff options with vc-git |
Date: |
Tue, 18 Nov 2014 14:09:53 -0500 |
User-agent: |
Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) |
Package: emacs
Version: 24.4
I would like to use context diffs with vc-diff. Or pretend I said "any
GNU diff option that git diff does not support".
If I
(setq diff-switches '("-c" -w"))
then it works fine with vc-bzr, which correctly converts these into
"--diff-options" for bzr diff. Same for vc-svn, which automatically adds
--diff-cmd.
With vc-git this does nothing. Setting vc-git-diff-switches to nil
doesn't do the right thing: it passes -c to "git diff", which
interprets it as "--combined", which is not what I wanted.
IIUC there's basically no way to get this with git diff, I have to use
difftool -x "diff -c"
(which seems to parse its -x argument on whitespace, yuck).
So, TLDR:
I'd like an option to call difftool instead of diff in vc-git-diff, please.
If it was consistent with eg vc-svn, this would happen by default when
vc-git-diff-switches was nil.
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#19099: [PATCH] vc-git: Support `diff-switches'. |
Date: |
Wed, 19 Nov 2014 12:13:14 +0100 |
User-agent: |
KMail/4.13.3 (Linux/3.13.0-39-generic; KDE/4.13.3; x86_64; ; ) |
tags 19099 fixed
On Tuesday 18 November 2014 23:36:11 Glenn Morris wrote:
> Thanks, works for me, and seems to neatly avoid being an incompatible
> change wrt vc-git-diff-switches being non-nil and non-t.
I've pushed it to master.
> BTW, I appreciate how you often try to improve git-related things.
Thanks!
Regards,
RĂ¼diger
--- End Message ---