Geoffrey Ferrari <geoffrey.ferrari@oriel.oxon.org> writes:
Hi Geoffrey,
> The issue can be traced to the definition of tramp-repository-branch
> in
> trampver.el. This calls:
>
> (emacs-repository-get-branch
> (locate-dominating-file (locate-library "tramp") ".git"))
>
> However, (locate-dominating-file (locate-library "tramp") ".git")
> evaluates to nil, meaning that above is equivalent to
> (emacs-repository-get-branch nil).
>
> This causes the function emacs-repository-get-branch (in version.el)
> to
> rely on the variable source-directory i.e. which references the source
> directory where the emacs
> binary was built, which of course does not exist on an end user's
> system.
Yes. However, the initial value of tramp-repository-branch is
--8<---------------cut here---------------start------------->8---
(ignore-errors
;; Suppress message from `emacs-repository-get-branch'.
(let ((inhibit-message t))
;; `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")))))
--8<---------------cut here---------------end--------------->8---
I'm wondering why you see an error, although the code is wrapped by
`ignore-errors'.
Best regards, Michael.