about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGriffin Smith <grfn@gws.fyi>2020-06-18T17·12-0400
committerGriffin Smith <grfn@gws.fyi>2020-06-18T17·15-0400
commit9448a2262b79e67c6b8b9a53cd806cd1f57d3da7 (patch)
treebce043479dc2f46b893e4cf91f9cf892422af56f
parentca67aa65982211ad57b8bf018190b794dcb74979 (diff)
feat(g/emacs): Add magit suffix for push-and-submit r/1024
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
-rw-r--r--users/glittershark/emacs.d/config.el14
1 files changed, 13 insertions, 1 deletions
diff --git a/users/glittershark/emacs.d/config.el b/users/glittershark/emacs.d/config.el
index 09d80b2acc..76964835fa 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))))