Be more flexible with the diffing.
* magit.el (magit-show-diff): Accept variable number of arguments. Updated callers.
This commit is contained in:
parent
8c4b0f9184
commit
0ef2ee3dd8
1 changed files with 5 additions and 5 deletions
10
magit.el
10
magit.el
|
@ -823,7 +823,7 @@ the current line into your working tree.
|
||||||
|
|
||||||
;;; Diffing
|
;;; Diffing
|
||||||
|
|
||||||
(defun magit-show-diff (from to)
|
(defun magit-show-diff (&rest args)
|
||||||
(let ((dir default-directory)
|
(let ((dir default-directory)
|
||||||
(buf (get-buffer-create "*magit-diff*")))
|
(buf (get-buffer-create "*magit-diff*")))
|
||||||
(display-buffer buf)
|
(display-buffer buf)
|
||||||
|
@ -833,12 +833,12 @@ the current line into your working tree.
|
||||||
(setq default-directory dir)
|
(setq default-directory dir)
|
||||||
(let ((inhibit-read-only t))
|
(let ((inhibit-read-only t))
|
||||||
(erase-buffer)
|
(erase-buffer)
|
||||||
(magit-insert-section 'diff nil 'magit-wash-diff
|
(apply 'magit-insert-section 'diff nil 'magit-wash-diff
|
||||||
"git" "diff" from to)))))
|
"git" "diff" args)))))
|
||||||
|
|
||||||
(defun magit-diff-with-branch (branch)
|
(defun magit-diff-with-branch (branch)
|
||||||
(interactive (list (magit-read-rev "Diff HEAD against: ")))
|
(interactive (list (magit-read-rev "Diff against: ")))
|
||||||
(magit-show-diff "HEAD" branch))
|
(magit-show-diff branch))
|
||||||
|
|
||||||
;;; Markers
|
;;; Markers
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue