Properly handle pushing a branch without a remote.

Before, this did "git push remote branch-name:nil".
Now it does "git push remote branch-name".
Git automatically sets up the remote.
This commit is contained in:
Nathan Weizenbaum 2010-06-24 16:40:28 -07:00
parent 5744d3ec98
commit 9b195b61e9

View file

@ -3042,7 +3042,10 @@ typing and automatically refreshes the status buffer."
(if (and (not branch-remote)
(not current-prefix-arg))
(magit-set push-remote "branch" branch "remote"))
(magit-run-git-async "push" "-v" push-remote (format "%s:%s" branch ref-branch))))
(magit-run-git-async "push" "-v" push-remote
(if ref-branch
(format "%s:%s" branch ref-branch)
branch))))
;;; Log edit mode