about summary refs log tree commit diff
path: root/tools
diff options
context:
space:
mode:
authorGriffin Smith <grfn@gws.fyi>2021-12-20T16·22-0500
committerclbot <clbot@tvl.fyi>2021-12-21T10·28+0000
commitd4ce1607c2ac94b08b8b5580af6c56239a4c98f4 (patch)
tree50a801c19fdd6332ee4c9e23e5fd40e6405040cb /tools
parentb9f510d98961241786290893afcebadf22ad5eef (diff)
fix(tvl.el): Change prompt for different commands r/3329
Prompting with "Checkout CL" for the gerrit cherry-pick command doesn't
make any sense.

Change-Id: I51495e7975202146fae2da0807e525596f2d490e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/4516
Autosubmit: grfn <grfn@gws.fyi>
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
Diffstat (limited to 'tools')
-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 4eace3e35cbb..5be32c1a6156 100644
--- a/tools/emacs-pkgs/tvl/tvl.el
+++ b/tools/emacs-pkgs/tvl/tvl.el
@@ -104,7 +104,7 @@ passes. This is potentially dangerous, use with care."
   (list "P" "push & rubberstamp to Gerrit" #'magit-gerrit-rubberstamp))
 
 (defvar magit-cl-history nil)
-(defun magit-read-cl (remote)
+(defun magit-read-cl (prompt remote)
   (let* ((refs (prog2 (message "Determining available refs...")
                    (magit-remote-list-refs remote)
                  (message "Determining available refs...done")))
@@ -138,14 +138,14 @@ passes. This is potentially dangerous, use with care."
      0
      'ref
      (magit-completing-read
-      "Checkout CL" cl-numbers nil t nil 'magit-cl-history))))
+      prompt cl-numbers nil t nil 'magit-cl-history))))
 
 (transient-define-suffix magit-gerrit-checkout (remote cl-refspec)
   "Prompt for a CL number and checkout the latest patchset of that CL with
   detached HEAD"
   (interactive
    (let* ((remote tvl-gerrit-remote)
-          (cl (magit-read-cl remote)))
+          (cl (magit-read-cl "Checkout CL" remote)))
      (list remote cl)))
   (magit-fetch-refspec remote cl-refspec (magit-fetch-arguments))
   ;; That runs async, so wait for it to finish (this is how magit does it)
@@ -164,7 +164,7 @@ passes. This is potentially dangerous, use with care."
   "Prompt for a CL number and cherry-pick the latest patchset of that CL"
   (interactive
    (let* ((remote tvl-gerrit-remote)
-          (cl (magit-read-cl remote)))
+          (cl (magit-read-cl "Cherry-pick CL" remote)))
      (list remote cl)))
   (magit-fetch-refspec remote cl-refspec (magit-fetch-arguments))
   ;; That runs async, so wait for it to finish (this is how magit does it)