| author | Heinz Fridolin <heinzfridolin@protonmail.com> | 2026-02-15 02:37:47 +0100 |
|---|---|---|
| committer | Dmitry Gutov <dmitry@gutov.dev> | 2026-02-15 18:23:51 +0200 |
| commit | e2bf7ce8b68b35adc5a8d9200a84373baf1cce8b (patch) | |
| tree | 10404ad8fd9e5b4b922c694edaac960167746b2a | |
| parent | 9a5eafa8c3b6eae880937956b1f08374c17eb8a8 (diff) | |
project.el: Fix in submodules with nonexistent git root (bug#80402)HEADmaster
project-try-vc--search in a submodule directory tries to find the git root directory, so the local variable root would be set to nil if it didn't exist. Calling project--vc-merge-submodules-p on nil would lead to a crash, so now the while loop aborts beforehand.
| -rw-r--r-- | lisp/progmodes/project.el | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index 0273eea26b8..afadd9b35a3 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -698,6 +698,7 @@ in the `project-current' call, the timeout is determined by
vc-handled-backends))
project)
(while (and
+ root
(eq backend 'Git)
(project--vc-merge-submodules-p root)
(project--submodule-p root))