]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix file listing in submodules with project-files-relative-names=t
authorPär Bohrarper <par.bohrarper@gmail.com>
Fri, 14 Jun 2024 01:04:20 +0000 (04:04 +0300)
committerEshel Yaron <me@eshelyaron.com>
Sat, 15 Jun 2024 17:21:12 +0000 (19:21 +0200)
* lisp/progmodes/project.el (project--vc-list-files):
Prepend module names to files when project-files-relative-names is
non-nil (bug#71538).

(cherry picked from commit 2dae603c4140a0a449b2ddaf572fe94de3908f31)

lisp/progmodes/project.el

index d73fac81280dc8686b516432956b19111451c0fd..e55b6be1fb35d89970811ce539c4eb6c4e21c1a1 100644 (file)
@@ -709,10 +709,16 @@ See `project-vc-extra-root-markers' for the marker value format.")
                 (mapcar
                  (lambda (module)
                    (when (file-directory-p module)
-                     (project--vc-list-files
-                      (concat default-directory module)
-                      backend
-                      extra-ignores)))
+                     (let ((sub-files
+                            (project--vc-list-files
+                             (concat default-directory module)
+                             backend
+                             extra-ignores)))
+                       (if project-files-relative-names
+                           (mapcar (lambda (file)
+                                     (concat (file-name-as-directory module) file))
+                                   sub-files)
+                         sub-files))))
                  submodules)))
            (setq files
                  (apply #'nconc files sub-files))))