branch: externals/vc-got commit f09d635903d423f3b3370842b8a719d431bc6047 Merge: e79563b df20ca2 Author: omar-polo <47739920+omar-p...@users.noreply.github.com> Commit: GitHub <nore...@github.com>
Merge pull request #2 from zmyrgel/feature/add-version-command add vc-got--program-version command to return version number --- vc-got.el | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/vc-got.el b/vc-got.el index 1e4b419..a451aa8 100755 --- a/vc-got.el +++ b/vc-got.el @@ -155,6 +155,12 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches." :group 'vc-got) ;; helpers +(defun vc-got--program-version () + "Returns the version string of used `Got' command." + (let (process-file-side-effects) + (with-temp-buffer + (vc-got--call "-V") + (substring (buffer-string) 4 -1)))) (defun vc-got-root (file) "Return the work tree root for FILE, or nil."