diff options
Diffstat (limited to 'lisp/net/trampver.el')
-rw-r--r-- | lisp/net/trampver.el | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/net/trampver.el b/lisp/net/trampver.el index e3bcd568d72..68fd110ec00 100644 --- a/lisp/net/trampver.el +++ b/lisp/net/trampver.el @@ -52,12 +52,13 @@ ;; Suppress message from `emacs-repository-get-branch'. We must ;; also handle out-of-tree builds. (let ((inhibit-message t) - (debug-on-error nil) (dir (or (locate-dominating-file (locate-library "tramp") ".git") - source-directory))) + source-directory)) + debug-on-error) ;; `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.") @@ -66,10 +67,11 @@ ;; Suppress message from `emacs-repository-get-version'. We must ;; also handle out-of-tree builds. (let ((inhibit-message t) - (debug-on-error nil) (dir (or (locate-dominating-file (locate-library "tramp") ".git") - source-directory))) + source-directory)) + debug-on-error) (and (stringp dir) (file-directory-p dir) + (executable-find "git") (emacs-repository-get-version dir)))) "The repository revision of the Tramp sources.") |