Skip to content

Commit

Permalink
magit-push-notes-ref: New command
Browse files Browse the repository at this point in the history
Closes magit#3934.

Suggested-by: Phil Sainty <[email protected]>
  • Loading branch information
tarsius committed Dec 29, 2019
1 parent 49dfbdb commit dff0bca
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion lisp/magit-push.el
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@
("r" "explicit refspecs" magit-push-refspecs)
("m" "matching branches" magit-push-matching)]
[("T" "a tag" magit-push-tag)
("t" "all tags" magit-push-tags)]]
("t" "all tags" magit-push-tags)
(6 "n" "a note ref" magit-push-notes-ref)]]
["Configure"
("C" "Set variables..." magit-branch-configure)])

Expand Down Expand Up @@ -250,6 +251,17 @@ branch as default."
(run-hooks 'magit-credential-hook)
(magit-run-git-async "push" remote tag args))

;;;###autoload
(defun magit-push-notes-ref (ref remote &optional args)
"Push a notes ref to another repository."
(interactive
(let ((note (magit-notes-read-ref "Push notes" nil nil)))
(list note
(magit-read-remote (format "Push %s to remote" note) nil t)
(magit-push-arguments))))
(run-hooks 'magit-credential-hook)
(magit-run-git-async "push" remote ref args))

;;;###autoload
(defun magit-push-implicitly (args)
"Push somewhere without using an explicit refspec.
Expand Down

0 comments on commit dff0bca

Please sign in to comment.