fix(tvl.el): Fix use of label command in refs

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
This commit is contained in:
Vincent Ambo 2021-12-10 23:58:07 +03:00 committed by clbot
parent f9bd68e247
commit 40888c9630

View file

@ -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))