Skip to content

Instantly share code, notes, and snippets.

@sbryant
Created June 16, 2010 13:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sbryant/440701 to your computer and use it in GitHub Desktop.
Save sbryant/440701 to your computer and use it in GitHub Desktop.
commit 7cf72482754596bc1b1416837f58f0378f196d97
Author: Sean Bryant <sbryant@hackinggibsons.com>
Date: Wed Jun 16 09:30:54 2010 -0400
make magit explicitly tell the branch where to push.
Modified magit.el
diff --git a/magit.el b/magit.el
index 55b2ba3..c03ad68 100644
--- a/magit.el
+++ b/magit.el
@@ -3037,11 +3037,12 @@ typing and automatically refreshes the status buffer."
(not branch-remote))
(magit-read-remote (format "Push %s to" branch)
branch-remote)
- branch-remote)))
+ branch-remote))
+ (ref-branch (magit-get "branch" branch "merge")))
(if (and (not branch-remote)
(not current-prefix-arg))
(magit-set push-remote "branch" branch "remote"))
- (magit-run-git-async "push" "-v" push-remote branch)))
+ (magit-run-git-async "push" "-v" push-remote (format "%s:%s" branch ref-branch))))
;;; Log edit mode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment