emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/magit 42ed6c1966 03/33: magit-refs-show-branch-description


From: Jonas Bernoulli
Subject: [nongnu] elpa/magit 42ed6c1966 03/33: magit-refs-show-branch-descriptions: New option
Date: Thu, 9 Jan 2025 14:09:58 -0500 (EST)

branch: elpa/magit
commit 42ed6c196693c37df546f2eb6712592fb4b302fe
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>

    magit-refs-show-branch-descriptions: New option
---
 lisp/magit-refs.el | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/lisp/magit-refs.el b/lisp/magit-refs.el
index 139ce9ea49..60891ff075 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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]