about summary refs log tree commit diff
path: root/tools
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2020-06-19T15·54+0100
committertazjin <mail@tazj.in>2020-06-19T17·54+0000
commit9266b3947dae0207800e778e2c9628d316ad9d68 (patch)
tree5785f548140d2a3d04fef63fd3c8b2775901b3a4 /tools
parente7f8bdd548a7347759c8704f4293daacf1277581 (diff)
feat(emacs-pkgs/tvl): Add #'tvl-depot-status function r/1040
This function opens the depot in magit. By default the depot path is
assumed to be `/depot`, but that is made available as a customise
option that users can override.

Change-Id: Iefc127cad515dbae330d7af3aa69a0c53aa02015
Reviewed-on: https://cl.tvl.fyi/c/depot/+/504
Reviewed-by: glittershark <grfn@gws.fyi>
Diffstat (limited to 'tools')
-rw-r--r--tools/emacs-pkgs/tvl/tvl.el9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/emacs-pkgs/tvl/tvl.el b/tools/emacs-pkgs/tvl/tvl.el
index 4947f66a65..cc50d6b234 100644
--- a/tools/emacs-pkgs/tvl/tvl.el
+++ b/tools/emacs-pkgs/tvl/tvl.el
@@ -25,6 +25,10 @@
   "Name of the git remote for gerrit"
   :group 'tvl)
 
+(defcustom tvl-depot-path "/depot"
+  "Location at which the TVL depot is checked out."
+  :group 'tvl)
+
 (defun tvl--gerrit-ref (target-branch &optional flags)
   (let ((flag-suffix (if flags (format "%%l=%s" (s-join "," flags))
                        "")))
@@ -67,5 +71,10 @@ rubberstamp operation is dangerous and should only be used in
   #'magit-push ["r"]
   (list "P" "push, rubberstamp & submit to Gerrit" #'magit-gerrit-rubberstamp))
 
+(defun tvl-depot-status ()
+  "Open the TVL monorepo in magit."
+  (interactive)
+  (magit-status tvl-depot-path))
+
 (provide 'tvl)
 ;;; tvl.el ends here