branch: externals/vc-got
commit df20ca2725ebd6753073d5f9827aa22bb67dc3eb
Author: Timo Myyrä <[email protected]>
Commit: Timo Myyrä <[email protected]>
add vc-got--program-version command to return version number
this can be used to select behaviour based on used got version.
---
vc-got.el | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/vc-got.el b/vc-got.el
index 6b0b0c0..f57e873 100755
--- a/vc-got.el
+++ b/vc-got.el
@@ -118,6 +118,12 @@ If nil, use the value of `vc-diff-switches'. If t, use no
switches."
(repeat :tag "Argument List" :value ("") string)))
;; 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."