[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 01/01: vc-git: Support `diff-switches'.
From: |
Rüdiger Sonderfeld |
Subject: |
[Emacs-diffs] master 01/01: vc-git: Support `diff-switches'. |
Date: |
Wed, 19 Nov 2014 11:10:26 +0000 |
branch: master
commit 6ffab21f41d5fd0f31b8dbaacea98be409e4fe51
Author: Rüdiger Sonderfeld <address@hidden>
Date: Wed Nov 19 03:55:00 2014 +0100
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.
---
lisp/ChangeLog | 6 ++++++
lisp/vc/vc-git.el | 17 ++++++++++++-----
2 files changed, 18 insertions(+), 5 deletions(-)
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 8b7f62a..25ef3b3 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
+2014-11-19 Rüdiger Sonderfeld <address@hidden>
+
+ Fix bug#19099.
+ * vc/vc-git.el (vc-git-diff): Use "difftool -x diff" with
+ `diff-switches' if `vc-git-diff-switches' is nil.
+
2014-11-18 Juri Linkov <address@hidden>
* 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 be0211c..3b11a3c 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -994,11 +994,18 @@ or BRANCH^ (where \"^\" can be repeated)."
(defun vc-git-diff (files &optional rev1 rev2 buffer)
"Get a difference report using Git between two revisions of FILES."
(let (process-file-side-effects)
- (apply #'vc-git-command (or buffer "*vc-diff*") 1 files
- (if (and rev1 rev2) "diff-tree" "diff-index")
- "--exit-code"
- (append (vc-switches 'git 'diff)
- (list "-p" (or rev1 "HEAD") rev2 "--")))))
+ (if vc-git-diff-switches
+ (apply #'vc-git-command (or buffer "*vc-diff*") 1 files
+ (if (and rev1 rev2) "diff-tree" "diff-index")
+ "--exit-code"
+ (append (vc-switches 'git 'diff)
+ (list "-p" (or rev1 "HEAD") rev2 "--")))
+ (vc-git-command (or buffer "*vc-diff*") 1 files
+ "difftool" "--exit-code" "--no-prompt" "-x"
+ (concat "diff "
+ (mapconcat 'identity
+ (vc-switches nil 'diff) " "))
+ (or rev1 "HEAD") rev2 "--"))))
(defun vc-git-revision-table (_files)
;; What about `files'?!? --Stef
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 01/01: vc-git: Support `diff-switches'.,
Rüdiger Sonderfeld <=