emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/vc-got e79563b 044/145: make got program customizable


From: ELPA Syncer
Subject: [elpa] externals/vc-got e79563b 044/145: make got program customizable
Date: Thu, 9 Sep 2021 15:58:30 -0400 (EDT)

branch: externals/vc-got
commit e79563bdabbe90721dc2532c1f97a26478108382
Merge: 7c257a7 febb894
Author: omar-polo <47739920+omar-polo@users.noreply.github.com>
Commit: GitHub <noreply@github.com>

    make got program customizable
---
 vc-got.el | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)

diff --git a/vc-got.el b/vc-got.el
index 86c3d16..1e4b419 100755
--- a/vc-got.el
+++ b/vc-got.el
@@ -136,8 +136,14 @@
 
 (require 'vc-got-stage)
 
-(defvar vc-got-cmd "got"
-  "The got command.")
+(defgroup vc-got nil
+  "VC GoT backend."
+  :group 'vc)
+
+(defcustom vc-got-program "got"
+  "Name of the Got executable (excluding any arguments)."
+  :type 'string
+  :group 'vc-got)
 
 (defcustom vc-got-diff-switches t
   "String or list of strings specifying switches for Got diff under VC.
@@ -145,7 +151,8 @@ If nil, use the value of `vc-diff-switches'.  If t, use no 
switches."
   :type '(choice (const :tag "Unspecified" nil)
                  (const :tag "None" t)
                  (string :tag "Argument String")
-                 (repeat :tag "Argument List" :value ("") string)))
+                 (repeat :tag "Argument List" :value ("") string))
+  :group 'vc-got)
 
 ;; helpers
 
@@ -169,8 +176,8 @@ Assume `default-directory' is inside a got worktree."
       (string-trim (buffer-string) nil "\n"))))
 
 (defun vc-got--call (&rest args)
-  "Call `vc-got-cmd' in the `default-directory' with ARGS and put the output 
in the current buffer."
-  (apply #'process-file vc-got-cmd nil (current-buffer) nil args))
+  "Call `vc-got-program' in the `default-directory' with ARGS and put the 
output in the current buffer."
+  (apply #'process-file vc-got-program nil (current-buffer) nil args))
 
 (defun vc-got--add (files)
   "Add FILES to got, passing `vc-register-switches' to the command invocation."
@@ -486,7 +493,7 @@ ROOT is the worktree root."
 
 (defun vc-got-pull (prompt)
   "Execute got pull, prompting the user for the full command if PROMPT is not 
nil."
-  (vc-got--push-pull vc-got-cmd "fetch" prompt (vc-got-root 
default-directory)))
+  (vc-got--push-pull vc-got-program "fetch" prompt (vc-got-root 
default-directory)))
 
 (defun vc-got-push (prompt)
   "Run git push (not got!) in the repository dir.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]