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

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

[elpa] externals/vc-got df20ca2 040/145: add vc-got--program-version com


From: ELPA Syncer
Subject: [elpa] externals/vc-got df20ca2 040/145: add vc-got--program-version command to return version number
Date: Thu, 9 Sep 2021 15:58:29 -0400 (EDT)

branch: externals/vc-got
commit df20ca2725ebd6753073d5f9827aa22bb67dc3eb
Author: Timo Myyrä <timo.myyra@bittivirhe.fi>
Commit: Timo Myyrä <timo.myyra@bittivirhe.fi>

    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."



reply via email to

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