Permalink
Browse files

#505 - Added a running log of git command output.

  • Loading branch information...
1 parent 3f60c51 commit 6d0b67d57da8949bd424cf9450a2802da0c828fb Phil Sainty committed Nov 30, 2012
Showing with 9 additions and 0 deletions.
  1. +9 −0 magit.el
View
@@ -2042,6 +2042,8 @@ function can be enriched by magit extension like magit-topgit and magit-svn"
(defvar magit-process-client-buffer nil)
(defvar magit-process-buffer-name "*magit-process*"
"Buffer name for running git commands.")
+(defvar magit-process-log-buffer-name "*magit-process-log*"
+ "Buffer name for the running log of output from git commands.")
(defun magit-run* (cmd-and-args
&optional logline noerase noerror nowait input)
@@ -2052,6 +2054,7 @@ function can be enriched by magit extension like magit-topgit and magit-svn"
(args (cdr cmd-and-args))
(dir default-directory)
(buf (get-buffer-create magit-process-buffer-name))
+ (log-buf (get-buffer-create magit-process-log-buffer-name))
(successp nil))
(magit-set-mode-line-process
(magit-process-indicator-from-command cmd-and-args))
@@ -2121,6 +2124,12 @@ function can be enriched by magit extension like magit-topgit and magit-svn"
(equal (apply 'process-file cmd nil buf nil args) 0))
(magit-set-mode-line-process nil)
(magit-need-refresh magit-process-client-buffer))))
+ ;; Append the contents of process-buffer to the log.
+ (with-current-buffer log-buf
+ (goto-char (point-max))
+ (insert "\n"))
+ (append-to-buffer log-buf (point-min) (point-max))
+ ;; Raise an error if the command failed.
(or successp
noerror
(error

0 comments on commit 6d0b67d

Please sign in to comment.