1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00

[project-vc]: Make project-buffers more consistent with project-files

* lisp/progmodes/project.el (project-buffers):
Catch 'file-missing' error to continue anyway if .git does not
exist (bug#74826).
This commit is contained in:
Dmitry Gutov 2025-01-02 18:58:40 +02:00
parent a720458fdd
commit afe776051e

View file

@ -848,7 +848,9 @@ DIRS must contain directory names."
(cl-defmethod project-buffers ((project (head vc))) (cl-defmethod project-buffers ((project (head vc)))
(let* ((root (expand-file-name (file-name-as-directory (project-root project)))) (let* ((root (expand-file-name (file-name-as-directory (project-root project))))
(modules (unless (or (project--vc-merge-submodules-p root) (modules (unless (or (project--vc-merge-submodules-p root)
(project--submodule-p root)) (condition-case nil
(project--submodule-p root)
(file-missing nil)))
(mapcar (mapcar
(lambda (m) (format "%s%s/" root m)) (lambda (m) (format "%s%s/" root m))
(project--git-submodules)))) (project--git-submodules))))