]> git.eshelyaron.com Git - emacs.git/commitdiff
project-try-vc--search: Fix inside recursive submodule setup
authorDmitry Gutov <dmitry@gutov.dev>
Tue, 3 Dec 2024 02:31:07 +0000 (04:31 +0200)
committerEshel Yaron <me@eshelyaron.com>
Wed, 4 Dec 2024 17:04:58 +0000 (18:04 +0100)
* lisp/progmodes/project.el (project-try-vc--search): Loop when
looking for submodule parent repository (bug#74614).

(cherry picked from commit 8534bb2d6b55ba55639058a5637da1f28797dddb)

lisp/progmodes/project.el

index f87c379c20350067349b305aca79b2afb34b2b59..2035a63800db9bb96bd2d19ec59072b30418247d 100644 (file)
@@ -585,10 +585,10 @@ See `project-vc-extra-root-markers' for the marker value format.")
                      last-matches))
            vc-handled-backends))
          project)
-    (when (and
-           (eq backend 'Git)
-           (project--vc-merge-submodules-p root)
-           (project--submodule-p root))
+    (while (and
+            (eq backend 'Git)
+            (project--vc-merge-submodules-p root)
+            (project--submodule-p root))
       (let* ((parent (file-name-directory (directory-file-name root))))
         (setq root (vc-call-backend 'Git 'root parent))))
     (when root