fix(tvl.el): Fix compilation warnings

This fixes all compilation warnings except the one about 'tvl lacking
a parent group, which we can look into later (it doesn't matter that much).

Change-Id: Iaff5e7f5f251f0670afb0a47031ccf197de69818
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3408
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
This commit is contained in:
Vincent Ambo 2021-08-24 19:44:37 +03:00 committed by tazjin
parent a4c8e8da92
commit 0ed3c48884

View file

@ -23,15 +23,18 @@
(defcustom tvl-gerrit-remote "origin" (defcustom tvl-gerrit-remote "origin"
"Name of the git remote for gerrit" "Name of the git remote for gerrit"
:type '(string)
:group 'tvl) :group 'tvl)
(defcustom tvl-depot-path "/depot" (defcustom tvl-depot-path "/depot"
"Location at which the TVL depot is checked out." "Location at which the TVL depot is checked out."
:type '(string)
:group 'tvl) :group 'tvl)
(defcustom tvl-target-branch "canon" (defcustom tvl-target-branch "canon"
"Branch to use to target CLs" "Branch to use to target CLs"
:group 'tvl :group 'tvl
:type '(string)
:safe (lambda (_) t)) :safe (lambda (_) t))
(defun tvl--gerrit-ref (target-branch &optional flags) (defun tvl--gerrit-ref (target-branch &optional flags)
@ -39,7 +42,7 @@
""))) "")))
(format "HEAD:refs/for/%s%s" target-branch flag-suffix))) (format "HEAD:refs/for/%s%s" target-branch flag-suffix)))
(define-suffix-command magit-gerrit-push-for-review () (transient-define-suffix magit-gerrit-push-for-review ()
"Push to Gerrit for review." "Push to Gerrit for review."
(interactive) (interactive)
(magit-push-refspecs tvl-gerrit-remote (magit-push-refspecs tvl-gerrit-remote
@ -50,7 +53,7 @@
#'magit-push ["r"] #'magit-push ["r"]
(list "R" "push to Gerrit for review" #'magit-gerrit-push-for-review)) (list "R" "push to Gerrit for review" #'magit-gerrit-push-for-review))
(define-suffix-command magit-gerrit-push-wip () (transient-define-suffix magit-gerrit-push-wip ()
"Push to Gerrit as a work-in-progress." "Push to Gerrit as a work-in-progress."
(interactive) (interactive)
(magit-push-refspecs tvl-gerrit-remote (magit-push-refspecs tvl-gerrit-remote
@ -61,7 +64,7 @@
#'magit-push ["r"] #'magit-push ["r"]
(list "W" "push to Gerrit as a work-in-progress" #'magit-gerrit-push-wip)) (list "W" "push to Gerrit as a work-in-progress" #'magit-gerrit-push-wip))
(define-suffix-command magit-gerrit-submit () (transient-define-suffix magit-gerrit-submit ()
"Push to Gerrit for review." "Push to Gerrit for review."
(interactive) (interactive)
(magit-push-refspecs tvl-gerrit-remote (magit-push-refspecs tvl-gerrit-remote
@ -73,7 +76,7 @@
(list "S" "push to Gerrit to submit" #'magit-gerrit-submit)) (list "S" "push to Gerrit to submit" #'magit-gerrit-submit))
(define-suffix-command magit-gerrit-rubberstamp () (transient-define-suffix magit-gerrit-rubberstamp ()
"Push, automatically approve and submit to Gerrit. This "Push, automatically approve and submit to Gerrit. This
rubberstamp operation is dangerous and should only be used in rubberstamp operation is dangerous and should only be used in
`//users'." `//users'."
@ -90,7 +93,7 @@ rubberstamp operation is dangerous and should only be used in
(defun tvl-depot-status () (defun tvl-depot-status ()
"Open the TVL monorepo in magit." "Open the TVL monorepo in magit."
(interactive) (interactive)
(magit-status tvl-depot-path)) (magit-status-setup-buffer tvl-depot-path))
(provide 'tvl) (provide 'tvl)
;;; tvl.el ends here ;;; tvl.el ends here