Commit 8290fabb authored by Jonas Bernoulli's avatar Jonas Bernoulli

magit-push-refspecs: new command

parent 0796f06c
......@@ -4,6 +4,10 @@ Magit v2.5.1 Release Notes (draft)
Updates since v2.5.0
--------------------
* Added new command `magit-push-refspecs', which allows pushing using
one or more comma-separated and refspecs, which are explicitly typed
in the minibuffer.
* When washing the diff that is to be displayed while writing a
commit message takes too long, then it is now possible to abort that
by pressing `C-g'. Previously that would have aborted the commit.
......
......@@ -404,8 +404,9 @@ removed after restarting Emacs."
"Push"
(?o "another branch" magit-push)
(?T "a tag" magit-push-tag)
(?m "matching branches" magit-push-matching)
(?t "all tags" magit-push-tags))
(?r "explicit refspecs" magit-push-refspecs)
(?t "all tags" magit-push-tags)
(?m "matching branches" magit-push-matching))
:max-action-columns 2)
(defun magit-git-push (branch target args)
......@@ -513,6 +514,22 @@ Both the source and the target are read in the minibuffer."
(magit-push-arguments))))
(magit-git-push source target args))
;;;###autoload
(defun magit-push-refspecs (remote refspecs args)
"Push one or multiple REFSPECS to a REMOTE.
Both the REMOTE and the REFSPECS are read in the minibuffer. To
use multiple REFSPECS, separate them with commas. Completion is
only available for the part before the colon, or when no colon
is used."
(interactive
(list (magit-read-remote "Push to remote")
(completing-read-multiple
"Push refspec,s: "
(cons "HEAD" (magit-list-local-branch-names)))
(magit-push-arguments)))
(run-hooks 'magit-credential-hook)
(magit-run-git-async "push" "-v" args remote refspecs))
;;;###autoload
(defun magit-push-matching (remote &optional args)
"Push all matching branches to another repository.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment