summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2022-06-08 12:42:10 +0200
committerMichael Albinus <michael.albinus@gmx.de>2022-06-08 12:42:10 +0200
commit768ed1476ae849777457b1eb666a2b0db9eb7374 (patch)
tree34f05554f87e635a08a93aa392fbfc837d19e9fa
parent7f778c6943f66bd1112bd41be19e223b64300509 (diff)
downloademacs-768ed1476ae849777457b1eb666a2b0db9eb7374.tar.gz
Make Tramp version check more robust
* lisp/net/trampver.el (tramp-repository-branch) (tramp-repository-version): Check for "git" executable.
-rw-r--r--lisp/net/trampver.el2
1 files changed, 2 insertions, 0 deletions
diff --git a/lisp/net/trampver.el b/lisp/net/trampver.el
index 9c04abc8289..5863beb2956 100644
--- a/lisp/net/trampver.el
+++ b/lisp/net/trampver.el
@@ -58,6 +58,7 @@
;; `emacs-repository-get-branch' has been introduced with Emacs 27.1.
(with-no-warnings
(and (stringp dir) (file-directory-p dir)
+ (executable-find "git")
(emacs-repository-get-branch dir)))))
"The repository branch of the Tramp sources.")
@@ -70,6 +71,7 @@
(dir (or (locate-dominating-file (locate-library "tramp") ".git")
source-directory)))
(and (stringp dir) (file-directory-p dir)
+ (executable-find "git")
(emacs-repository-get-version dir))))
"The repository revision of the Tramp sources.")