From 9448a2262b79e67c6b8b9a53cd806cd1f57d3da7 Mon Sep 17 00:00:00 2001 From: Griffin Smith Date: Thu, 18 Jun 2020 13:12:46 -0400 Subject: feat(g/emacs): Add magit suffix for push-and-submit Gerrit supports pushing, reviewing and submitting in one go, which will make pushing to my own emacs/system/etc. config way simpler Change-Id: Ie1eec7c1e56a9549e63fb81de6b6791647da6c4e --- users/glittershark/emacs.d/config.el | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/users/glittershark/emacs.d/config.el b/users/glittershark/emacs.d/config.el index 09d80b2acc47..76964835fa94 100644 --- a/users/glittershark/emacs.d/config.el +++ b/users/glittershark/emacs.d/config.el @@ -633,7 +633,19 @@ #'magit-branch ["c"] (list "C" "Checkout Clubhouse branch" #'magit-checkout-org-clubhouse-branch)) - ) + + (define-suffix-command magit-push-and-submit () + (interactive) + (magit-push-refspecs + "origin" "HEAD:refs/for/master%l=Code-Review+2,publish-comments,submit" + nil)) + + (transient-append-suffix + #'magit-push + ["r"] + + (list "P" "Push and submit to gerrit" + #'magit-push-and-submit))) ;; (defun grfn/split-window-more-sensibly (&optional window) ;; (let ((window (or window (selected-window)))) -- cgit 1.4.1