Commit ec579a06 authored by Jonas Bernoulli's avatar Jonas Bernoulli

magit-push-tag: new command

parent b34fa669
...@@ -164,11 +164,13 @@ then read the remote." ...@@ -164,11 +164,13 @@ then read the remote."
(?d "Dry run" "--dry-run") (?d "Dry run" "--dry-run")
(?u "Set upstream" "--set-upstream")) (?u "Set upstream" "--set-upstream"))
:actions '((?P "Current" magit-push-current) :actions '((?P "Current" magit-push-current)
(?o "Other" magit-push)
(?e "Elsewhere" magit-push-elsewhere) (?e "Elsewhere" magit-push-elsewhere)
(?t "Tags" magit-push-tags)
(?o "Other" magit-push)
(?m "Matching" magit-push-matching) (?m "Matching" magit-push-matching)
(?t "Tags" magit-push-tags)) (?T "Tag" magit-push-tag))
:default-action 'magit-push-current) :default-action 'magit-push-current
:max-action-columns 3)
;;;###autoload ;;;###autoload
(defun magit-push-current (branch remote &optional remote-branch args) (defun magit-push-current (branch remote &optional remote-branch args)
...@@ -228,6 +230,15 @@ branch as default." ...@@ -228,6 +230,15 @@ branch as default."
(magit-push-arguments))) (magit-push-arguments)))
(magit-run-git-async "push" remote "--tags" args)) (magit-run-git-async "push" remote "--tags" args))
(defun magit-push-tag (tag remote &optional args)
"Push a tag to another repository."
(let ((tag (magit-read-tag "Push tag")))
(list tag (magit-read-remote (format "Push %s to remote" tag) nil t))))
(magit-run-git-async "push" remote tag))
;;; magit-remote.el ends soon ;;; magit-remote.el ends soon
(provide 'magit-remote) (provide 'magit-remote)
;; Local Variables: ;; Local Variables:
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