GNU bug report logs -
#71538
29.3; project-find-file stopped working for files in git submodules
Previous Next
Reported by: Pär Bohrarper <par.bohrarper <at> gmail.com>
Date: Thu, 13 Jun 2024 16:50:01 UTC
Severity: normal
Found in version 29.3
Done: Stefan Kangas <stefankangas <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Hi!
On 13/06/2024 17:55, Pär Bohrarper wrote:
> Since
> https://github.com/emacs-mirror/emacs/commit/370b216f08699bdd85b910868642df441c06306c <https://github.com/emacs-mirror/emacs/commit/370b216f08699bdd85b910868642df441c06306c>
> project-find-file will produce a list where files located in a git
> submodule is listed relative to the submodule instead of relative to the
> project root. The problem happens when recursing into submodules if
> project--vc-merge-submodules-p is true.
Thanks for the report.
I managed to fix it locally by
> concating the module name to the file in the recursive call:
>
> (let ((sub-files-maybe-relative
> (project--vc-list-files
> (concat default-directory module)
> backend
> extra-ignores)))
> (if project-files-relative-names
> ;; If project--vc-list-files returns relative names, then concat the
> submodule name
> (mapcar (lambda (file) (concat (file-name-as-directory module) file))
> sub-files-maybe-relative)
> sub-files-maybe-relative))
>
> I don't know if this is the correct approach though.
It's okay, I've pushed your patch to master with minor alterations in
commit 2dae603c414. Thank you.
Do you install the newer versions of 'project' from ELPA or build Emacs
from source?
This bug report was last modified 81 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.