From a5b72daa029118db62d5a2530966131be50cd7be Mon Sep 17 00:00:00 2001 From: Nathan Weizenbaum Date: Thu, 24 Jun 2010 16:56:18 -0700 Subject: [PATCH] When pushing a new branch, manually add merge configuration. --- magit.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/magit.el b/magit.el index 6ca688e9..311e760a 100644 --- a/magit.el +++ b/magit.el @@ -3045,7 +3045,12 @@ typing and automatically refreshes the status buffer." (magit-run-git-async "push" "-v" push-remote (if ref-branch (format "%s:%s" branch ref-branch) - branch)))) + branch)) + ;; Although git will automatically set up the remote, + ;; it doesn't set up the branch to merge (at least as of Git 1.6.6.1), + ;; so we have to do that manually. + (unless ref-branch + (magit-set (concat "refs/heads/" branch) "branch" branch "merge")))) ;;; Log edit mode