From 0ef2ee3dd8422bd0974a37e732604c5d0d455346 Mon Sep 17 00:00:00 2001 From: Marius Vollmer Date: Tue, 12 Aug 2008 03:18:04 +0300 Subject: [PATCH] Be more flexible with the diffing. * magit.el (magit-show-diff): Accept variable number of arguments. Updated callers. --- magit.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/magit.el b/magit.el index 61a02936..3b9782e2 100644 --- a/magit.el +++ b/magit.el @@ -823,7 +823,7 @@ the current line into your working tree. ;;; Diffing -(defun magit-show-diff (from to) +(defun magit-show-diff (&rest args) (let ((dir default-directory) (buf (get-buffer-create "*magit-diff*"))) (display-buffer buf) @@ -833,12 +833,12 @@ the current line into your working tree. (setq default-directory dir) (let ((inhibit-read-only t)) (erase-buffer) - (magit-insert-section 'diff nil 'magit-wash-diff - "git" "diff" from to))))) + (apply 'magit-insert-section 'diff nil 'magit-wash-diff + "git" "diff" args))))) (defun magit-diff-with-branch (branch) - (interactive (list (magit-read-rev "Diff HEAD against: "))) - (magit-show-diff "HEAD" branch)) + (interactive (list (magit-read-rev "Diff against: "))) + (magit-show-diff branch)) ;;; Markers