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

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

[nongnu] elpa/git-commit 12b415e033: magit-push-implicitly--desc: Return


From: ELPA Syncer
Subject: [nongnu] elpa/git-commit 12b415e033: magit-push-implicitly--desc: Return desc for push.default=nothing
Date: Sat, 25 Jun 2022 07:58:24 -0400 (EDT)

branch: elpa/git-commit
commit 12b415e0333bd4f6523236cbc9791173dcda160f
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>

    magit-push-implicitly--desc: Return desc for push.default=nothing
---
 lisp/magit-push.el | 51 +++++++++++++++++++++++++++------------------------
 1 file changed, 27 insertions(+), 24 deletions(-)

diff --git a/lisp/magit-push.el b/lisp/magit-push.el
index c28aca5b39..7c68ce1770 100644
--- a/lisp/magit-push.el
+++ b/lisp/magit-push.el
@@ -292,30 +292,33 @@ what this command will do.  For example:
 
 (defun magit-push-implicitly--desc ()
   (let ((default (magit-get "push.default")))
-    (unless (equal default "nothing")
-      (or (and-let* ((remote (or (magit-get-remote)
-                                 (magit-primary-remote)))
-                     (refspec (magit-get "remote" remote "push")))
-            (format "%s using %s"
-                    (magit--propertize-face remote 'magit-branch-remote)
-                    (magit--propertize-face refspec 'bold)))
-          (and-let* ((upstream (and (not (magit-get-push-branch))
-                                    (magit-get-upstream-branch))))
-            (format "%s aka %s\n"
-                    (magit-branch-set-face upstream)
-                    (magit--propertize-face "@{upstream}" 'bold)))
-          (and-let* ((push-branch (magit-get-push-branch)))
-            (format "%s aka %s\n"
-                    (magit-branch-set-face push-branch)
-                    (magit--propertize-face "pushRemote" 'bold)))
-          (and-let* ((push-branch (magit-get-@{push}-branch)))
-            (format "%s aka %s\n"
-                    (magit-branch-set-face push-branch)
-                    (magit--propertize-face "@{push}" 'bold)))
-          (format "using %s (%s is %s)\n"
-                  (magit--propertize-face "git push"     'bold)
-                  (magit--propertize-face "push.default" 'bold)
-                  (magit--propertize-face default        'bold))))))
+    (or (and (equal default "nothing")
+             (format "nothing (%s is %s)\n"
+                     (magit--propertize-face "push.default" 'bold)
+                     (magit--propertize-face default        'bold)))
+        (and-let* ((remote (or (magit-get-remote)
+                               (magit-primary-remote)))
+                   (refspec (magit-get "remote" remote "push")))
+          (format "%s using %s"
+                  (magit--propertize-face remote 'magit-branch-remote)
+                  (magit--propertize-face refspec 'bold)))
+        (and-let* ((upstream (and (not (magit-get-push-branch))
+                                  (magit-get-upstream-branch))))
+          (format "%s aka %s\n"
+                  (magit-branch-set-face upstream)
+                  (magit--propertize-face "@{upstream}" 'bold)))
+        (and-let* ((push-branch (magit-get-push-branch)))
+          (format "%s aka %s\n"
+                  (magit-branch-set-face push-branch)
+                  (magit--propertize-face "pushRemote" 'bold)))
+        (and-let* ((push-branch (magit-get-@{push}-branch)))
+          (format "%s aka %s\n"
+                  (magit-branch-set-face push-branch)
+                  (magit--propertize-face "@{push}" 'bold)))
+        (format "using %s (%s is %s)\n"
+                (magit--propertize-face "git push"     'bold)
+                (magit--propertize-face "push.default" 'bold)
+                (magit--propertize-face default        'bold)))))
 
 ;;;###autoload
 (defun magit-push-to-remote (remote args)



reply via email to

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