Added a couple of faces for good/bad bisect refs.
This commit is contained in:
parent
420c976f85
commit
0241232622
1 changed files with 43 additions and 15 deletions
30
magit.el
30
magit.el
|
@ -248,6 +248,30 @@ Many Magit faces inherit from this one by default."
|
||||||
"Face for git tag labels shown in log buffer."
|
"Face for git tag labels shown in log buffer."
|
||||||
:group 'magit)
|
:group 'magit)
|
||||||
|
|
||||||
|
(defface magit-log-head-label-bisect-good
|
||||||
|
'((((class color) (background light))
|
||||||
|
:box t
|
||||||
|
:background "Grey85"
|
||||||
|
:foreground "green")
|
||||||
|
(((class color) (background dark))
|
||||||
|
:box t
|
||||||
|
:background "Grey11"
|
||||||
|
:foreground "green"))
|
||||||
|
"Face for good bisect refs"
|
||||||
|
:group 'magit)
|
||||||
|
|
||||||
|
(defface magit-log-head-label-bisect-bad
|
||||||
|
'((((class color) (background light))
|
||||||
|
:box t
|
||||||
|
:background "Grey85"
|
||||||
|
:foreground "red")
|
||||||
|
(((class color) (background dark))
|
||||||
|
:box t
|
||||||
|
:background "Grey11"
|
||||||
|
:foreground "red"))
|
||||||
|
"Face for bad bisect refs"
|
||||||
|
:group 'magit)
|
||||||
|
|
||||||
(defface magit-log-head-label-remote
|
(defface magit-log-head-label-remote
|
||||||
'((((class color) (background light))
|
'((((class color) (background light))
|
||||||
:box t
|
:box t
|
||||||
|
@ -2172,7 +2196,7 @@ must return a string which will represent the log line.")
|
||||||
|
|
||||||
(defun magit-present-log-line (graph sha1 refs message)
|
(defun magit-present-log-line (graph sha1 refs message)
|
||||||
"The default log line generator."
|
"The default log line generator."
|
||||||
(let* ((ref-re "\\(?:tag: \\)?refs/\\(tags\\|remotes\\|heads\\)/\\(.+\\)")
|
(let* ((ref-re "\\(?:tag: \\)?refs/\\(bisect\\|tags\\|remotes\\|heads\\)/\\(.+\\)")
|
||||||
(string-refs
|
(string-refs
|
||||||
(when refs
|
(when refs
|
||||||
(concat (mapconcat
|
(concat (mapconcat
|
||||||
|
@ -2184,6 +2208,10 @@ must return a string which will represent the log line.")
|
||||||
'face (cond
|
'face (cond
|
||||||
((string= (match-string 1 r) "remotes")
|
((string= (match-string 1 r) "remotes")
|
||||||
'magit-log-head-label-remote)
|
'magit-log-head-label-remote)
|
||||||
|
((string= (match-string 1 r) "bisect")
|
||||||
|
(if (string= (match-string 2 r) "bad")
|
||||||
|
'magit-log-head-label-bisect-bad
|
||||||
|
'magit-log-head-label-bisect-good))
|
||||||
((string= (match-string 1 r) "tags")
|
((string= (match-string 1 r) "tags")
|
||||||
'magit-log-head-label-tags)
|
'magit-log-head-label-tags)
|
||||||
((string= (match-string 1 r) "heads")
|
((string= (match-string 1 r) "heads")
|
||||||
|
|
Loading…
Add table
Reference in a new issue