[project-vc]: Make project-buffers more consistent with project-files
authorDmitry Gutov <dmitry@gutov.dev>
Thu, 2 Jan 2025 16:58:40 +0000 (18:58 +0200)
committerDmitry Gutov <dmitry@gutov.dev>
Thu, 2 Jan 2025 16:58:40 +0000 (18:58 +0200)
* lisp/progmodes/project.el (project-buffers):
Catch 'file-missing' error to continue anyway if .git does not
exist (bug#74826).

lisp/progmodes/project.el

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