From 0404f6281aef2e3d1f22fb9ded6e1ff1710e65f5 Mon Sep 17 00:00:00 2001 From: Patrick Bader Date: Mon, 4 Mar 2024 16:14:25 +0100 Subject: [PATCH] fix: project submodule detection does not work for worktrees (cherry picked from commit 5037b9eed711dec0ef73dd6fca1e60e0b521c13b) --- lisp/progmodes/project.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index b92d326fbf5..47db14bde27 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -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)))) -- 2.39.5