bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#71538: 29.3; project-find-file stopped working for files in git subm


From: Dmitry Gutov
Subject: bug#71538: 29.3; project-find-file stopped working for files in git submodules
Date: Fri, 14 Jun 2024 04:08:52 +0300
User-agent: Mozilla Thunderbird

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?





reply via email to

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