[Top][All Lists]

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

master 4307a84: Fix submodules, second try

From: Dmitry Gutov
Subject: master 4307a84: Fix submodules, second try
Date: Fri, 15 May 2020 17:07:02 -0400 (EDT)

branch: master
commit 4307a84fd8cb57934f45ee4450c91c08bb86b4a3
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>

    Fix submodules, second try
    * lisp/progmodes/project.el (project-try-vc):
    Call the backend directly instead of binding default-directory.
 lisp/progmodes/project.el | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index faa60d1..0ce2786 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -274,8 +274,7 @@ backend implementation of `project-external-roots'.")
              ;; Don't stop at submodule boundary.
              (or (vc-file-getprop dir 'project-git-root)
-                 (let* ((default-directory dir)
-                        (root (vc-root-dir))
+                 (let* ((root (vc-call-backend backend 'root dir))
                         (gitfile (expand-file-name ".git" root)))
                     dir 'project-git-root
@@ -287,9 +286,8 @@ backend implementation of `project-external-roots'.")
                         (goto-char (point-min))
                         (looking-at "gitdir: [./]+/\.git/modules/"))
                       (let* ((parent (file-name-directory
-                                      (directory-file-name root)))
-                             (default-directory parent))
-                        (vc-root-dir)))
+                                      (directory-file-name root))))
+                        (vc-call-backend backend 'root parent)))
                      (t root)))
             ('nil nil)

reply via email to

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