Skip to content

Commit

Permalink
Ask about correct branch when setting upstream of non-current branch
Browse files Browse the repository at this point in the history
  • Loading branch information
tarsius committed Jun 20, 2017
1 parent b64a143 commit c002b44
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Documentation/RelNotes/2.11.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ Fixes since v2.10.3

* Staging a link failed when it points to a repository.

* When setting the upstream of a branch that isn't the current branch,
the user was asked what branch to use as the upstream of the current
branch anyway, even though the correct branch would then be modified.

This release also contains the fixes described in the v2.10.{1,2,3}
release notes, as well as other minor improvements, bug fixes, typo
fixes, and documentation fixes.
2 changes: 1 addition & 1 deletion lisp/magit-branch.el
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ already set. When nil, then always unset."
(interactive
(let ((branch (magit-branch-config-branch "Change upstream of branch")))
(list branch (and (not (magit-get-upstream-branch branch))
(magit-read-upstream-branch)))))
(magit-read-upstream-branch branch)))))
(if upstream
(-let (((remote . merge) (magit-split-branch-name upstream)))
(setf (magit-get (format "branch.%s.remote" branch)) remote)
Expand Down

0 comments on commit c002b44

Please sign in to comment.