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
58
magit.el
58
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,22 +2208,26 @@ 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")
|
||||||
'magit-log-head-label-local))))
|
'magit-log-head-label-local))))
|
||||||
refs
|
refs
|
||||||
" ")
|
" ")
|
||||||
" "))))
|
" "))))
|
||||||
(concat
|
(concat
|
||||||
(if sha1
|
(if sha1
|
||||||
(propertize (substring sha1 0 8) 'face 'magit-log-sha1)
|
(propertize (substring sha1 0 8) 'face 'magit-log-sha1)
|
||||||
(insert-char ? 8))
|
(insert-char ? 8))
|
||||||
" "
|
" "
|
||||||
(propertize graph 'face 'magit-log-graph)
|
(propertize graph 'face 'magit-log-graph)
|
||||||
string-refs
|
string-refs
|
||||||
(when message
|
(when message
|
||||||
(propertize message 'face 'magit-log-message)))))
|
(propertize message 'face 'magit-log-message)))))
|
||||||
|
|
||||||
(defvar magit-log-count ()
|
(defvar magit-log-count ()
|
||||||
"internal var used to count the number of log actualy added in a buffer")
|
"internal var used to count the number of log actualy added in a buffer")
|
||||||
|
|
Loading…
Add table
Reference in a new issue