branch: elpa/magit
commit 4a5a8068d35f3309d0c447487f4cc98fa1e39ed8
Author: Jonas Bernoulli <[email protected]>
Commit: Jonas Bernoulli <[email protected]>
magit-merge-dissolve: Avoid duplicating work
---
lisp/magit-merge.el | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/lisp/magit-merge.el b/lisp/magit-merge.el
index e00c15761ec..e5280f5c4f6 100644
--- a/lisp/magit-merge.el
+++ b/lisp/magit-merge.el
@@ -139,12 +139,11 @@ obsolete version of the commits that are being merged.
Finally
if `forge-branch-pullreq' was used to create the merged branch,
then also remove the respective remote branch."
(interactive
- (list (magit-read-other-local-branch
- (format "Merge `%s' into"
- (or (magit-get-current-branch)
- (magit-rev-parse "HEAD")))
- nil
- (magit-get-local-upstream-branch))
+ (list (let ((branch (magit-get-current-branch)))
+ (magit-read-other-local-branch
+ (format "Merge `%s' into" (or branch (magit-rev-parse "HEAD")))
+ nil
+ (and branch (magit-get-local-upstream-branch branch))))
(magit-merge-arguments)))
(let ((current (magit-get-current-branch))
(head (magit-rev-parse "HEAD")))