aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRüdiger Sonderfeld2014-11-19 03:55:00 +0100
committerRüdiger Sonderfeld2014-11-19 12:09:57 +0100
commit6ffab21f41d5fd0f31b8dbaacea98be409e4fe51 (patch)
treecb9aad5509a9ded5e20d1595aed9520214eed351
parent6316435de740af0dce794740ba05382664c806f2 (diff)
downloademacs-6ffab21f41d5fd0f31b8dbaacea98be409e4fe51.tar.gz
emacs-6ffab21f41d5fd0f31b8dbaacea98be409e4fe51.zip
vc-git: Support `diff-switches'.
Fix bug#19099. * lisp/vc/vc-git.el (vc-git-diff): Use "difftool -x diff" with `diff-switches' if `vc-git-diff-switches' is nil.
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/vc/vc-git.el17
2 files changed, 18 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 8b7f62a306e..25ef3b3be71 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12014-11-19 Rüdiger Sonderfeld <ruediger@c-plusplus.net>
2
3 Fix bug#19099.
4 * vc/vc-git.el (vc-git-diff): Use "difftool -x diff" with
5 `diff-switches' if `vc-git-diff-switches' is nil.
6
12014-11-18 Juri Linkov <juri@linkov.net> 72014-11-18 Juri Linkov <juri@linkov.net>
2 8
3 * simple.el (next-line-or-history-element): Wrap next-line 9 * simple.el (next-line-or-history-element): Wrap next-line
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index be0211c1132..3b11a3cd635 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -994,11 +994,18 @@ or BRANCH^ (where \"^\" can be repeated)."
994(defun vc-git-diff (files &optional rev1 rev2 buffer) 994(defun vc-git-diff (files &optional rev1 rev2 buffer)
995 "Get a difference report using Git between two revisions of FILES." 995 "Get a difference report using Git between two revisions of FILES."
996 (let (process-file-side-effects) 996 (let (process-file-side-effects)
997 (apply #'vc-git-command (or buffer "*vc-diff*") 1 files 997 (if vc-git-diff-switches
998 (if (and rev1 rev2) "diff-tree" "diff-index") 998 (apply #'vc-git-command (or buffer "*vc-diff*") 1 files
999 "--exit-code" 999 (if (and rev1 rev2) "diff-tree" "diff-index")
1000 (append (vc-switches 'git 'diff) 1000 "--exit-code"
1001 (list "-p" (or rev1 "HEAD") rev2 "--"))))) 1001 (append (vc-switches 'git 'diff)
1002 (list "-p" (or rev1 "HEAD") rev2 "--")))
1003 (vc-git-command (or buffer "*vc-diff*") 1 files
1004 "difftool" "--exit-code" "--no-prompt" "-x"
1005 (concat "diff "
1006 (mapconcat 'identity
1007 (vc-switches nil 'diff) " "))
1008 (or rev1 "HEAD") rev2 "--"))))
1002 1009
1003(defun vc-git-revision-table (_files) 1010(defun vc-git-revision-table (_files)
1004 ;; What about `files'?!? --Stef 1011 ;; What about `files'?!? --Stef