From 9b195b61e92c66ee73b1712f9b44c8893353320b Mon Sep 17 00:00:00 2001 From: Nathan Weizenbaum Date: Thu, 24 Jun 2010 16:40:28 -0700 Subject: [PATCH] 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. --- magit.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/magit.el b/magit.el index c03ad68d..6ca688e9 100644 --- a/magit.el +++ b/magit.el @@ -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