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

    magit-version: Also show forge version
---
 lisp/magit.el | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/lisp/magit.el b/lisp/magit.el
index 8a7696f902b..72f0bde010c 100644
--- a/lisp/magit.el
+++ b/lisp/magit.el
@@ -658,7 +658,7 @@ the output in the kill ring.
     (if (stringp magit-version)
         (when print-dest
           (let ((str (format
-                      "Magit %s%s, Transient %s, Git %s, Emacs %s, %s"
+                      "Magit %s%s, Transient %s,%s Git %s, Emacs %s, %s"
                       (or magit-version "(unknown)")
                       (or (and (ignore-errors
                                  (magit--version>= magit-version "2008"))
@@ -680,6 +680,18 @@ the output in the kill ring.
                                     (locate-library "transient.el" t))
                                    (lm-header "Package-Version"))))
                           "(unknown)")
+                      (let ((lib (locate-library "forge.el" t)))
+                        (or (and lib
+                                 (format
+                                  " Forge %s,"
+                                  (or (ignore-errors
+                                        (require 'lisp-mnt)
+                                        (with-temp-buffer
+                                          (insert-file-contents lib)
+                                          (and (fboundp 'lm-header)
+                                               (lm-header "Package-Version"))))
+                                      "(unknown)")))
+                            ""))
                       (magit--safe-git-version)
                       emacs-version
                       system-type)))

Reply via email to