branch: elpa/git-commit commit bf3bcbe051e5c397f50ba80e674d0751781e4fa8 Author: Jonas Bernoulli <jo...@bernoul.li> Commit: Jonas Bernoulli <jo...@bernoul.li>
magit-branch-warning: New face Closes #4550. --- lisp/magit-refs.el | 3 +-- lisp/magit-status.el | 10 +++++----- lisp/magit.el | 5 +++++ 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/lisp/magit-refs.el b/lisp/magit-refs.el index e21bb1e..6f9287c 100644 --- a/lisp/magit-refs.el +++ b/lisp/magit-refs.el @@ -653,8 +653,7 @@ line is inserted at all." (if branch (magit-refs--propertize-branch branch ref (and headp 'magit-branch-current)) - (magit--propertize-face "(detached)" - 'font-lock-warning-face))) + (magit--propertize-face "(detached)" 'magit-branch-warning))) (u:ahead (and u:track (string-match "ahead \\([0-9]+\\)" u:track) (magit--propertize-face diff --git a/lisp/magit-status.el b/lisp/magit-status.el index ddb0191..7c900a8 100644 --- a/lisp/magit-status.el +++ b/lisp/magit-status.el @@ -638,16 +638,16 @@ arguments are for internal use only." (concat (propertize merge 'font-lock-face 'magit-branch-local) " " (propertize "does not exist" - 'font-lock-face 'font-lock-warning-face)) + 'font-lock-face 'magit-branch-warning)) (format "%s %s %s" (propertize merge 'font-lock-face 'magit-branch-remote) (propertize "does not exist on" - 'font-lock-face 'font-lock-warning-face) + 'font-lock-face 'magit-branch-warning) (propertize remote 'font-lock-face 'magit-branch-remote)))) (t (propertize "invalid upstream configuration" - 'font-lock-face 'font-lock-warning-face))))) + 'font-lock-face 'magit-branch-warning))))) (insert ?\n)))))) (defun magit-insert-push-branch-header () @@ -671,10 +671,10 @@ arguments are for internal use only." (if (magit-remote-p remote) (concat target " " (propertize "does not exist" - 'font-lock-face 'font-lock-warning-face)) + 'font-lock-face 'magit-branch-warning)) (concat remote " " (propertize "remote does not exist" - 'font-lock-face 'font-lock-warning-face)))))) + 'font-lock-face 'magit-branch-warning)))))) (insert ?\n)))) (defun magit-insert-tags-header () diff --git a/lisp/magit.el b/lisp/magit.el index 9e1c459..c3dc590 100644 --- a/lisp/magit.el +++ b/lisp/magit.el @@ -133,6 +133,11 @@ This face is only used in logs and it gets combined and/or `magit-branch-remote-head'." :group 'magit-faces) +(defface magit-branch-warning + '((t :inherit font-lock-warning-face)) + "Face for warning about (missing) branch." + :group 'magit-faces) + (defface magit-head '((((class color) (background light)) :inherit magit-branch-local) (((class color) (background dark)) :inherit magit-branch-local))