Color log #481

Merged
merged 3 commits into from Jan 6, 2013
View
@@ -83,6 +83,7 @@
(require 'log-edit)
(require 'easymenu)
(require 'diff-mode)
+(require 'ansi-color)
;; Silences byte-compiler warnings
(eval-and-compile
@@ -875,7 +876,7 @@ Does not follow symlinks."
cmd
nil (list t nil) nil
args)))))
- (replace-regexp-in-string "\e\\[.*?m" "" cmd-output)))
+ (ansi-color-apply cmd-output)))
(defun magit-git-string (&rest args)
(magit-trim-line (magit-git-output args)))
@@ -3190,8 +3191,7 @@ must return a string which will represent the log line.")
(propertize sha1 'face 'magit-log-sha1)
(insert-char ? magit-sha1-abbrev-length))
" "
- (when graph
- (propertize graph 'face 'magit-log-graph))
+ graph
string-refs
(when message
(propertize message 'face 'magit-log-message)))))
@@ -4908,6 +4908,7 @@ With a non numeric prefix ARG, show all entries"
(t nil))
,@(if magit-have-decorate (list "--decorate=full"))
,@(if magit-have-graph (list "--graph"))
+ ,"--color"
,@args
"--"))))