commit f09d635903d423f3b3370842b8a719d431bc6047 from: omar-polo <47739920+omar-polo@users.noreply.github.com> via: GitHub date: Thu Dec 31 14:47:37 2020 UTC Merge pull request #2 from zmyrgel/feature/add-version-command add vc-got--program-version command to return version number commit - e79563bdabbe90721dc2532c1f97a26478108382 commit + f09d635903d423f3b3370842b8a719d431bc6047 blob - 1e4b41965650f5048fa24100852980dbe039988a blob + a451aa85c87319cc60b1cb20529bc026f0b74d2b --- vc-got.el +++ vc-got.el @@ -155,6 +155,12 @@ If nil, use the value of `vc-diff-switches'. If t, us :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."