From ef5c7ec4990a603ff476e2266c31ea055ac0b609 Mon Sep 17 00:00:00 2001 From: Philip Kaludercic Date: Wed, 30 Apr 2025 17:07:09 +0200 Subject: [PATCH] Improve detection of VC package revisions * lisp/emacs-lisp/package-vc.el (package-vc-commit): If the package specification lists a :lisp-dir, use that to search for Lisp files. --- lisp/emacs-lisp/package-vc.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el index 0652979b6bb..c1431aa4324 100644 --- a/lisp/emacs-lisp/package-vc.el +++ b/lisp/emacs-lisp/package-vc.el @@ -219,7 +219,9 @@ asynchronously." ;; FIXME: vc should be extended to allow querying the commit of a ;; directory (as is possible when dealing with git repositories). ;; This should be a fallback option. - (cl-loop with dir = (package-desc-dir pkg-desc) + (cl-loop with dir = (let ((pkg-spec (package-vc--desc->spec pkg-desc))) + (or (plist-get pkg-spec :lisp-dir) + (package-desc-dir pkg-desc))) for file in (directory-files dir t "\\.el\\'" t) when (vc-working-revision file) return it finally return "unknown"))