branch: externals/vc-got commit d54ceb890b973c9f1af37a21789f52f5db830a37 Author: Timo Myyrä <timo.my...@bittivirhe.fi> Commit: Timo Myyrä <timo.my...@bittivirhe.fi>
make got program be customizable other platforms might have different name for got or it might not be in PATH so provide means to customize it. --- vc-got.el | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/vc-got.el b/vc-got.el index 6b0b0c0..2e1eecb 100755 --- a/vc-got.el +++ b/vc-got.el @@ -106,8 +106,9 @@ (require 'vc-got-stage) -(defvar vc-got-cmd "got" - "The got command.") +(defcustom vc-got-program "got" + "Name of the Got executable (excluding any arguments)." + :type 'string) (defcustom vc-got-diff-switches t "String or list of strings specifying switches for Got diff under VC. @@ -139,8 +140,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." @@ -456,7 +457,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.