Merge remote branch 'refs/remotes/nex3/push-new-branch'

Closes #25.
This commit is contained in:
Phil Jackson 2010-06-27 18:43:26 +01:00
commit 9c1a508827
2 changed files with 14 additions and 4 deletions

View file

@ -3045,7 +3045,15 @@ 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))
;; 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

View file

@ -649,10 +649,12 @@ it, like from any other diff.
Magit will run @code{git push} when you type @kbd{P}. If you give a
prefix argument to @kbd{P}, you will be prompted for the repository to
push to. When no default remote repositor has been configured yet for
push to. When no default remote repository has been configured yet for
the current branch, you will be prompted as well. Typing @kbd{P} will
only push the current branch to the remote. In other words, it will
run @code{git push <remote> <branch>}.
only push the current branch to the remote. In other words, it will run
@code{git push <remote> <branch>}. The branch will be created in the
remote if it doesn't exist already. The local branch will be configured
so that it pulls from the new remote branch.
Typing @kbd{f} will run @code{git remote update}. With a prefix arg, it
will prompt for the name of the remote to update. Typing @kbd{F} will