emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master ce91565: Fix Bug#33394


From: Michael Albinus
Subject: [Emacs-diffs] master ce91565: Fix Bug#33394
Date: Thu, 15 Nov 2018 07:55:31 -0500 (EST)

branch: master
commit ce915653df74166fe6eb5783d57619b73cd74681
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>

    Fix Bug#33394
    
    * lisp/net/trampver.el (tramp-repository-branch)
    (tramp-repository-version): Handle out-of-tree builds.  (Bug#33394)
---
 lisp/net/trampver.el | 22 ++++++++++++++--------
 1 file changed, 14 insertions(+), 8 deletions(-)

diff --git a/lisp/net/trampver.el b/lisp/net/trampver.el
index f93e538..d9b152e 100644
--- a/lisp/net/trampver.el
+++ b/lisp/net/trampver.el
@@ -40,20 +40,26 @@
 
 (defconst tramp-repository-branch
   (ignore-errors
-    ;; Suppress message from `emacs-repository-get-branch'.
-    (let ((inhibit-message t))
+    ;; Suppress message from `emacs-repository-get-branch'.  We must
+    ;; also handle out-of-tree builds.
+    (let ((inhibit-message t)
+         (dir (or (locate-dominating-file (locate-library "tramp") ".git")
+                  source-directory)))
       ;; `emacs-repository-get-branch' has been introduced with Emacs 27.1.
       (with-no-warnings
-       (emacs-repository-get-branch
-        (locate-dominating-file (locate-library "tramp") ".git")))))
+       (and (stringp dir) (file-directory-p dir)
+            (emacs-repository-get-branch dir)))))
   "The repository branch of the Tramp sources.")
 
 (defconst tramp-repository-version
   (ignore-errors
-    ;; Suppress message from `emacs-repository-get-version'.
-    (let ((inhibit-message t))
-      (emacs-repository-get-version
-       (locate-dominating-file (locate-library "tramp") ".git"))))
+    ;; Suppress message from `emacs-repository-get-version'.  We must
+    ;; also handle out-of-tree builds.
+    (let ((inhibit-message t)
+         (dir (or (locate-dominating-file (locate-library "tramp") ".git")
+                  source-directory)))
+      (and (stringp dir) (file-directory-p dir)
+          (emacs-repository-get-version dir))))
   "The repository revision of the Tramp sources.")
 
 ;; Check for Emacs version.



reply via email to

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