about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGriffin Smith <grfn@gws.fyi>2020-06-24T20·14-0400
committerglittershark <grfn@gws.fyi>2020-06-25T12·06+0000
commitc96f8327f6ffd89f3def1387d0ab2d2d66f8f2d3 (patch)
tree76da748051f1661824bb3a8272a886f8963b0ba5
parent6944d0c96a21a0033a7b2a49714e4e9e8522aabf (diff)
feat(tvl.el): Add push-wip command r/1081
P W, to push as a work-in-progress CL

Change-Id: Ibc6973512e8dcd3ce77b2f1064906a98e9a3a182
Reviewed-on: https://cl.tvl.fyi/c/depot/+/575
Reviewed-by: tazjin <mail@tazj.in>
-rw-r--r--tools/emacs-pkgs/tvl/tvl.el11
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/emacs-pkgs/tvl/tvl.el b/tools/emacs-pkgs/tvl/tvl.el
index 8468efed04..987ddcfe93 100644
--- a/tools/emacs-pkgs/tvl/tvl.el
+++ b/tools/emacs-pkgs/tvl/tvl.el
@@ -45,6 +45,17 @@
   #'magit-push ["r"]
   (list "R" "push to Gerrit for review" #'magit-gerrit-push-for-review))
 
+(define-suffix-command magit-gerrit-push-wip ()
+  "Push to Gerrit as a work-in-progress."
+  (interactive)
+  (magit-push-refspecs tvl-gerrit-remote
+                       (concat (tvl--gerrit-ref "canon") "%wip")
+                       nil))
+
+(transient-append-suffix
+  #'magit-push ["r"]
+  (list "W" "push to Gerrit as a work-in-progress" #'magit-gerrit-push-wip))
+
 (define-suffix-command magit-gerrit-submit ()
   "Push to Gerrit for review."
   (interactive)