diff options
| author | Jonas Bernoulli <jonas@bernoul.li> | 2023-09-19 16:53:34 +0200 |
|---|---|---|
| committer | Jonas Bernoulli <jonas@bernoul.li> | 2023-09-19 16:53:34 +0200 |
| commit | ac3ff103a9806815fa1b14813da750b0d423a340 (patch) | |
| tree | 5ab3acfe4efb87b96cd0fe3112ec376e4050da27 /lisp/magit-push.el | |
| parent | 4f4ad9c091daf769f8a0a562f6d14a71aa6c3192 (diff) | |
Use pcase-setq
Diffstat (limited to 'lisp/magit-push.el')
| -rw-r--r-- | lisp/magit-push.el | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lisp/magit-push.el b/lisp/magit-push.el index 46a95fd..cf00f68 100644 --- a/lisp/magit-push.el +++ b/lisp/magit-push.el @@ -138,11 +138,10 @@ the upstream." (format "Set upstream of %s and push there" branch) branches nil nil nil 'magit-revision-history (or (car (member (magit-remote-branch-at-point) branches)) - (car (member "origin/master" branches))))) - (upstream* (or (magit-get-tracked upstream) - (magit-split-branch-name upstream)))) - (setq remote (car upstream*)) - (setq merge (cdr upstream*)) + (car (member "origin/master" branches)))))) + (pcase-setq `(,remote . ,merge) + (or (magit-get-tracked upstream) + (magit-split-branch-name upstream))) (unless (string-prefix-p "refs/" merge) ;; User selected a non-existent remote-tracking branch. ;; It is very likely, but not certain, that this is the |
