From: Gustav Hållberg Date: Mon, 12 Jan 2009 20:20:13 +0000 (+0100) Subject: stgit.el: Make single file diff buffer read-only X-Git-Tag: v0.15-rc1~57 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/stgit/commitdiff_plain/5f1b00134eecb000fad349603ce0796ff6061abb stgit.el: Make single file diff buffer read-only Signed-off-by: Gustav Hållberg Signed-off-by: Karl Hasselström --- 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 @@ (defun stgit-show () (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."