about summary refs log tree commit diff
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2021-12-10T20·58+0300
committerclbot <clbot@tvl.fyi>2021-12-10T21·08+0000
commit40888c96301db6c6af7f049fdb8df272e5d00085 (patch)
tree721427691e23ade934b424aa3ae8a0b0487a33a6
parentf9bd68e247b7bb900ed5ad79c21d8364ef567ede (diff)
fix(tvl.el): Fix use of label command in refs r/3206
The l= is part of the command, not of the shape of commands, and the
previous command concatenation logic was wrong because of that.

Fix is done in the most obvious way: Make the l= part of the command.

Change-Id: Ia3c08c3da60fe5fc38f29a2d94adcd123e4f3052
-rw-r--r--tools/emacs-pkgs/tvl/tvl.el8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/emacs-pkgs/tvl/tvl.el b/tools/emacs-pkgs/tvl/tvl.el
index 2f9a04619c55..6888de3571b6 100644
--- a/tools/emacs-pkgs/tvl/tvl.el
+++ b/tools/emacs-pkgs/tvl/tvl.el
@@ -38,7 +38,7 @@
   :safe (lambda (_) t))
 
 (defun tvl--gerrit-ref (target-branch &optional flags)
-  (let ((flag-suffix (if flags (format "%%l=%s" (s-join "," flags))
+  (let ((flag-suffix (if flags (format "%%%s" (s-join "," flags))
                        "")))
     (format "HEAD:refs/for/%s%s" target-branch flag-suffix)))
 
@@ -68,7 +68,7 @@
   "Push to Gerrit with autosubmit enabled."
   (interactive)
   (magit-push-refspecs tvl-gerrit-remote
-                       (tvl--gerrit-ref tvl-target-branch '("Autosubmit+1"))
+                       (tvl--gerrit-ref tvl-target-branch '("l=Autosubmit+1"))
                        nil))
 
 (transient-append-suffix
@@ -94,8 +94,8 @@ passes. This is potentially dangerous, use with care."
   (interactive)
   (magit-push-refspecs tvl-gerrit-remote
                        (tvl--gerrit-ref tvl-target-branch
-                                        '("Code-Review+2"
-                                          "Autosubmit+1"
+                                        '("l=Code-Review+2"
+                                          "l=Autosubmit+1"
                                           "publish-comments"))
                        nil))