From d4ce1607c2ac94b08b8b5580af6c56239a4c98f4 Mon Sep 17 00:00:00 2001 From: Griffin Smith Date: Mon, 20 Dec 2021 11:22:46 -0500 Subject: fix(tvl.el): Change prompt for different commands 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 Tested-by: BuildkiteCI Reviewed-by: tazjin --- tools/emacs-pkgs/tvl/tvl.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tools') 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) -- cgit 1.4.1