Subject: bug#19099: closed (Re: bug#19099: [PATCH] vc-git: Support `diff-switches'.)

From: [email-masked] (GNU bug Tracking System)
Date: Wed, 19 Nov 2014 11:14:03 +0000

Your bug report

#19099: Diff options with vc-git

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
19099: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19099
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#19099: [PATCH] vc-git: Support `diff-switches'.
From: Rüdiger Sonderfeld <[email-masked]>
To: Glenn Morris <[email-masked]>
Cc: [email-masked],Rüdiger Sonderfeld <[email-masked]>
Date: Wed, 19 Nov 2014 12:13:14 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

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

Subject: Diff options with vc-git
From: Glenn Morris <[email-masked]>
To: [email-masked]
Date: Tue, 18 Nov 2014 14:09:53 -0500
List-Id: <debbugs-submit.debbugs.gnu.org>

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.