aboutsummaryrefslogtreecommitdiff
path: root/lisp/magit-refs.el
diff options
context:
space:
mode:
authorJonas Bernoulli <jonas@bernoul.li>2025-01-02 14:06:38 +0100
committerJonas Bernoulli <jonas@bernoul.li>2025-01-02 14:06:38 +0100
commit42ed6c196693c37df546f2eb6712592fb4b302fe (patch)
treeb22b2d427ceea202772d9e034631bd6cd41b1ebc /lisp/magit-refs.el
parent80194f2319396e8523934d2f3fb029a2a33c38b2 (diff)
magit-refs-show-branch-descriptions: New option
Diffstat (limited to 'lisp/magit-refs.el')
-rw-r--r--lisp/magit-refs.el14
1 files changed, 13 insertions, 1 deletions
diff --git a/lisp/magit-refs.el b/lisp/magit-refs.el
index 139ce9e..60891ff 100644
--- a/lisp/magit-refs.el
+++ b/lisp/magit-refs.el
@@ -100,6 +100,15 @@ in the heading preceding the list of its branches."
:group 'magit-refs
:type 'boolean)
+(defcustom magit-refs-show-branch-descriptions nil
+ "Whether to show the description, if any, of local branches.
+To distinguish branch descriptions from the commit summary of the tip,
+which is shown when there is no description or this option is disabled,
+descriptions use the bold face."
+ :package-version '(magit . "4.2.1")
+ :group 'magit-refs
+ :type 'boolean)
+
(defcustom magit-refs-margin
(list nil
(nth 1 magit-log-margin)
@@ -725,7 +734,10 @@ line is inserted at all."
(magit--propertize-face
push 'magit-branch-remote)
" "))
- (and msg (magit-log-propertize-keywords nil msg)))))))
+ (if-let ((magit-refs-show-branch-descriptions)
+ (desc (magit-get "branch" branch "description")))
+ (magit--propertize-face desc 'bold)
+ (and msg (magit-log-propertize-keywords nil msg))))))))
(defun magit-refs--format-focus-column (ref &optional type)
(let ((focus magit-buffer-upstream)