Have magit-push use magit-get-remote.

This commit is contained in:
Nathan Weizenbaum 2010-06-10 16:37:20 -07:00
parent db32004209
commit c2516ed37e

View file

@ -3039,7 +3039,7 @@ typing and automatically refreshes the status buffer."
(interactive) (interactive)
(let* ((branch (or (magit-get-current-branch) (let* ((branch (or (magit-get-current-branch)
(error "Don't push a detached head. That's gross"))) (error "Don't push a detached head. That's gross")))
(branch-remote (magit-get "branch" branch "remote")) (branch-remote (magit-get-remote branch))
(push-remote (if (or current-prefix-arg (push-remote (if (or current-prefix-arg
(not branch-remote)) (not branch-remote))
(magit-read-remote (format "Push %s to" branch) (magit-read-remote (format "Push %s to" branch)