From 5f1b00134eecb000fad349603ce0796ff6061abb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Gustav=20H=C3=A5llberg?= Date: Mon, 12 Jan 2009 21:20:13 +0100 Subject: [PATCH] stgit.el: Make single file diff buffer read-only MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Gustav Hållberg Signed-off-by: Karl Hasselström --- contrib/stgit.el | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/contrib/stgit.el b/contrib/stgit.el index 9c88e60..b2ef43c 100644 --- a/contrib/stgit.el +++ b/contrib/stgit.el @@ -713,20 +713,17 @@ With numeric prefix argument, pop that many patches." (unless patched-file (error "No patch or file at point")) (let ((id (stgit-id (car patched-file)))) - (with-output-to-temp-buffer "*StGit diff*" - (if (consp (cdr patched-file)) - ;; two files (copy or rename) - (stgit-run-git "diff" "-C" "-C" (concat id "^") id "--" - (cadr patched-file) (cddr patched-file)) - ;; just one file - (stgit-run-git "diff" (concat id "^") id "--" - (cdr patched-file))) - (with-current-buffer standard-output - (diff-mode))))) - (stgit-run "show" patchsym) - (with-current-buffer standard-output - (goto-char (point-min)) - (diff-mode)))))) + (if (consp (cdr patched-file)) + ;; two files (copy or rename) + (stgit-run-git "diff" "-C" "-C" (concat id "^") id "--" + (cadr patched-file) (cddr patched-file)) + ;; just one file + (stgit-run-git "diff" (concat id "^") id "--" + (cdr patched-file))))) + (stgit-run "show" patchsym)) + (with-current-buffer standard-output + (goto-char (point-min)) + (diff-mode))))) (defun stgit-edit () "Edit the patch on the current line." -- 2.11.0