Skip to content

Commit

Permalink
magit-cmd-output: do not corrupt output
Browse files Browse the repository at this point in the history
This fixes #544.  There is no reason why we would want to manipulate
git's output.  In the master and next branches something similar to
the code removed in this commit was used to have colorful graphs in
logs, but in maint that isn't the case.
  • Loading branch information
tarsius committed May 8, 2013
1 parent 80a9d8d commit 20c068f
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions magit.el
Original file line number Diff line number Diff line change
Expand Up @@ -879,13 +879,12 @@ Read `completing-read' documentation for the meaning of the argument"
(insert (magit-cmd-output cmd args)))

(defun magit-cmd-output (cmd args)
(let ((cmd-output (with-output-to-string
(with-current-buffer standard-output
(apply #'process-file
cmd
nil (list t nil) nil
args)))))
(replace-regexp-in-string "\e\\[.*?m" "" cmd-output)))
(with-output-to-string
(with-current-buffer standard-output
(apply #'process-file
cmd
nil (list t nil) nil
args))))

(defun magit-git-string (&rest args)
(magit-trim-line (magit-git-output args)))
Expand Down

0 comments on commit 20c068f

Please sign in to comment.