aboutsummaryrefslogtreecommitdiff
path: root/lisp/magit-push.el
diff options
context:
space:
mode:
authorJonas Bernoulli <jonas@bernoul.li>2026-01-01 16:53:09 +0100
committerJonas Bernoulli <jonas@bernoul.li>2026-01-01 16:53:09 +0100
commited67642a25e8aa6fc5c5438fb1ddb6d7c7e94ddf (patch)
tree06f6ac33e8492e36301ede1782365d6d3b3b79da /lisp/magit-push.el
parent1c723f86a3eb75d2082506942b3bc057406b0287 (diff)
Improve indentation of cond
Emacs 31.1 adds variable `lisp-indent-local-overrides'.
Diffstat (limited to 'lisp/magit-push.el')
-rw-r--r--lisp/magit-push.el60
1 files changed, 30 insertions, 30 deletions
diff --git a/lisp/magit-push.el b/lisp/magit-push.el
index ea1b9a2..75aa9b0 100644
--- a/lisp/magit-push.el
+++ b/lisp/magit-push.el
@@ -100,14 +100,14 @@ argument the push-remote can be changed before pushed to it."
(remote (magit-get-push-remote branch))
(v (magit--push-remote-variable branch t)))
(cond
- (target)
- ((member remote (magit-list-remotes))
- (format "%s, creating it"
- (magit--propertize-face (concat remote "/" branch)
- 'magit-branch-remote)))
- (remote
- (format "%s, replacing invalid" v))
- ((format "%s, setting that" v)))))
+ (target)
+ ((member remote (magit-list-remotes))
+ (format "%s, creating it"
+ (magit--propertize-face (concat remote "/" branch)
+ 'magit-branch-remote)))
+ (remote
+ (format "%s, replacing invalid" v))
+ ((format "%s, setting that" v)))))
;;;###autoload(autoload 'magit-push-current-to-upstream "magit-push" nil t)
(transient-define-suffix magit-push-current-to-upstream (args)
@@ -160,17 +160,17 @@ the upstream."
(merge (magit-get "branch" branch "merge"))
(u (magit--propertize-face "@{upstream}" 'bold)))
(cond
- ((magit--unnamed-upstream-p remote merge)
- (format "%s as %s"
- (magit--propertize-face remote 'bold)
- (magit--propertize-face merge 'magit-branch-remote)))
- ((magit--valid-upstream-p remote merge)
- (format "%s creating %s"
- (magit--propertize-face remote 'magit-branch-remote)
- (magit--propertize-face merge 'magit-branch-remote)))
- ((or remote merge)
- (concat u ", creating it and replacing invalid"))
- ((concat u ", creating it")))))))
+ ((magit--unnamed-upstream-p remote merge)
+ (format "%s as %s"
+ (magit--propertize-face remote 'bold)
+ (magit--propertize-face merge 'magit-branch-remote)))
+ ((magit--valid-upstream-p remote merge)
+ (format "%s creating %s"
+ (magit--propertize-face remote 'magit-branch-remote)
+ (magit--propertize-face merge 'magit-branch-remote)))
+ ((or remote merge)
+ (concat u ", creating it and replacing invalid"))
+ ((concat u ", creating it")))))))
;;;###autoload
(defun magit-push-current (target args)
@@ -326,17 +326,17 @@ what this command will do. To add it use something like:
(format "%s to %s"
(magit--propertize-face branch 'magit-branch-current)
(cond
- ((string-prefix-p "refs/heads/" ref)
- (magit--propertize-face
- (format "%s/%s" remote
- (substring ref (length "refs/heads/")))
- 'magit-branch-remote))
- ((not (string-match "/" ref))
- (magit--propertize-face (format "%s/%s" remote ref)
- 'magit-branch-remote))
- ((format "%s as %s"
- (magit--propertize-face remote 'bold)
- (magit--propertize-face ref 'bold)))))
+ ((string-prefix-p "refs/heads/" ref)
+ (magit--propertize-face
+ (format "%s/%s" remote
+ (substring ref (length "refs/heads/")))
+ 'magit-branch-remote))
+ ((not (string-match "/" ref))
+ (magit--propertize-face (format "%s/%s" remote ref)
+ 'magit-branch-remote))
+ ((format "%s as %s"
+ (magit--propertize-face remote 'bold)
+ (magit--propertize-face ref 'bold)))))
"nothing (no upstream)")))
("matching" (format "all matching to %s"
(magit--propertize-face remote 'bold)))))))))