branch: elpa/magit
commit 53ad9e40b4f307dbbdad2f4c99982cc9e453bd7f
Author: Jonas Bernoulli <jo...@bernoul.li>
Commit: Jonas Bernoulli <jo...@bernoul.li>

    magit-log--wash-summary: New function
---
 lisp/magit-log.el       |  7 +++++--
 lisp/magit-refs.el      |  6 +++---
 lisp/magit-status.el    | 15 +++++++--------
 lisp/magit-submodule.el |  3 +--
 4 files changed, 16 insertions(+), 15 deletions(-)

diff --git a/lisp/magit-log.el b/lisp/magit-log.el
index b17b468afab..2c15012dda2 100644
--- a/lisp/magit-log.el
+++ b/lisp/magit-log.el
@@ -1387,7 +1387,7 @@ Do not add this to a hook variable."
             (insert (magit-reflog-format-subject
                      (substring refsub 0
                                 (if (string-search ":" refsub) -2 -1))))))
-        (insert (funcall magit-log-format-message-function hash msg))
+        (insert (magit-log--wash-summary msg))
         (when (and refs magit-log-show-refname-after-summary)
           (insert ?\s)
           (insert (magit-format-ref-labels refs)))
@@ -1451,7 +1451,10 @@ Do not add this to a hook variable."
                 (insert graph ?\n))))))))
   t)
 
-(defun magit-log-propertize-keywords (_rev msg)
+(defun magit-log--wash-summary (summary)
+  (funcall magit-log-format-message-function summary))
+
+(defun magit-log-propertize-keywords (msg)
   (let ((boundary 0))
     (when (string-match "^\\(?:squash\\|fixup\\)! " msg boundary)
       (setq boundary (match-end 0))
diff --git a/lisp/magit-refs.el b/lisp/magit-refs.el
index 60891ff0758..b2a4ab086b9 100644
--- a/lisp/magit-refs.el
+++ b/lisp/magit-refs.el
@@ -561,7 +561,7 @@ line is inserted at all."
                                magit-refs-primary-column-width)
                              (length tag)))
                    ?\s)
-                  (and msg (magit-log-propertize-keywords nil msg)))
+                  (and msg (magit-log--wash-summary msg)))
                 (when (and magit-refs-margin-for-tags (magit-buffer-margin-p))
                   (magit-refs--format-margin tag))
                 (magit-refs--insert-cherry-commits tag)))))
@@ -616,7 +616,7 @@ line is inserted at all."
                                    magit-refs-primary-column-width)
                                  (length abbrev)))
                        ?\s)
-                      (and msg (magit-log-propertize-keywords nil msg))))
+                      (and msg (magit-log--wash-summary msg))))
                   (when (magit-buffer-margin-p)
                     (magit-refs--format-margin branch))
                   (magit-refs--insert-cherry-commits branch))))))))
@@ -737,7 +737,7 @@ line is inserted at all."
               (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))))))))
+                (and msg (magit-log--wash-summary msg))))))))
 
 (defun magit-refs--format-focus-column (ref &optional type)
   (let ((focus magit-buffer-upstream)
diff --git a/lisp/magit-status.el b/lisp/magit-status.el
index 626a899c7e0..f9954f8d356 100644
--- a/lisp/magit-status.el
+++ b/lisp/magit-status.el
@@ -589,13 +589,13 @@ instead.  The optional BRANCH argument is for internal 
use only."
               (insert (propertize commit 'font-lock-face 'magit-hash) ?\s))
             (insert (propertize branch 'font-lock-face 'magit-branch-local))
             (insert ?\s)
-            (insert (funcall magit-log-format-message-function branch summary))
+            (insert (magit-log--wash-summary summary))
             (insert ?\n))
         (magit-insert-section (commit commit)
           (insert (format "%-10s" "Head: "))
           (insert (propertize commit 'font-lock-face 'magit-hash))
           (insert ?\s)
-          (insert (funcall magit-log-format-message-function nil summary))
+          (insert (magit-log--wash-summary summary))
           (insert ?\n))))))
 
 (defun magit-insert-upstream-branch-header (&optional branch upstream keyword)
@@ -622,9 +622,9 @@ arguments are for internal use only."
                                                 'font-lock-face 'magit-hash)
                                     " "))
                        upstream " "
-                       (funcall magit-log-format-message-function upstream
-                                (or (magit-rev-format "%s" upstream)
-                                    "(no commit message)")))
+                       (magit-log--wash-summary
+                        (or (magit-rev-format "%s" upstream)
+                            "(no commit message)")))
              (cond
               ((magit--unnamed-upstream-p remote merge)
                (concat (propertize merge  'font-lock-face 'magit-branch-remote)
@@ -660,9 +660,8 @@ arguments are for internal use only."
                                             'font-lock-face 'magit-hash)
                                 " "))
                    target " "
-                   (funcall magit-log-format-message-function target
-                            (or (magit-rev-format "%s" target)
-                                "(no commit message)")))
+                   (magit-log--wash-summary (or (magit-rev-format "%s" target)
+                                                "(no commit message)")))
          (let ((remote (magit-get-push-remote branch)))
            (if (magit-remote-p remote)
                (concat target " "
diff --git a/lisp/magit-submodule.el b/lisp/magit-submodule.el
index 675b615062e..01763f54abf 100644
--- a/lisp/magit-submodule.el
+++ b/lisp/magit-submodule.el
@@ -618,8 +618,7 @@ These sections can be expanded to show the respective 
commits."
                     (msg (match-string 2 line)))
                 (magit-insert-section (module-commit rev t)
                   (insert (propertize rev 'font-lock-face 'magit-hash) " "
-                          (funcall magit-log-format-message-function rev msg)
-                          "\n")))))))
+                          (magit-log--wash-summary msg) "\n")))))))
       (magit-cancel-section 'if-empty)
       (insert ?\n))))
 

Reply via email to