emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

project.el: git submodules?


From: Gary Oberbrunner
Subject: project.el: git submodules?
Date: Tue, 12 May 2020 11:31:39 -0400

In project.el as of 3f2788d4acd53 (Dec 27 2019), there is this code:

+          (pcase backend
+            ('Git
+             ;; Don't stop at submodule boundary.
+             (or (vc-file-getprop dir 'project-git-root)
+                 (vc-file-setprop dir 'project-git-root
+                                  (vc-find-root dir ".git/"))))

That is not working in my situation, by which I mean I call
(project-current) in a buffer in a git submodule and it returns '(Git
. "submodule-root") rather than the actual project root, despite the
comment there that says it shouldn't do that. Following through the
code I don't see how it's supposed to be detecting that it's in a
submodule. Looks like it just looks upwards for the dominating ".git/"
dir.

In a simple test it appears to work, but not in my real-world case.
Before I dig deeper into it, can anyone (Dmitry?) tell me where to
look for the submodule-detection logic?

-- 
Gary



reply via email to

[Prev in Thread] Current Thread [Next in Thread]