]> git.eshelyaron.com Git - emacs.git/commitdiff
fix: project submodule detection does not work for worktrees
authorPatrick Bader <patrick.bader@thingos.io>
Mon, 4 Mar 2024 15:14:25 +0000 (16:14 +0100)
committerEshel Yaron <me@eshelyaron.com>
Fri, 15 Mar 2024 09:05:54 +0000 (10:05 +0100)
(cherry picked from commit 5037b9eed711dec0ef73dd6fca1e60e0b521c13b)

lisp/progmodes/project.el

index b92d326fbf5a830e036aa16242e636e1aaba9d88..47db14bde276957e9ecf8b2b6433581ba4c72e23 100644 (file)
@@ -597,7 +597,7 @@ See `project-vc-extra-root-markers' for the marker value format.")
         (goto-char (point-min))
         ;; Kind of a hack to distinguish a submodule from
         ;; other cases of .git files pointing elsewhere.
-        (looking-at "gitdir: [./]+/\\.git/modules/"))
+        (looking-at "gitdir: .+/\\.git/\\(worktrees/.*\\)?modules/"))
       t)
      (t nil))))