]> git.eshelyaron.com Git - emacs.git/commitdiff
Make Tramp version check more robust
authorMichael Albinus <michael.albinus@gmx.de>
Wed, 8 Jun 2022 10:42:10 +0000 (12:42 +0200)
committerMichael Albinus <michael.albinus@gmx.de>
Wed, 8 Jun 2022 10:42:10 +0000 (12:42 +0200)
* lisp/net/trampver.el (tramp-repository-branch)
(tramp-repository-version): Check for "git" executable.

lisp/net/trampver.el

index 9c04abc828907e085b41fec080f61fab6c058beb..5863beb29560bcfac2a3e65bf5ddf3b5eaad926e 100644 (file)
@@ -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.")