]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix Git submodules detection breakage
authorDmitry Gutov <dgutov@yandex.ru>
Fri, 15 May 2020 19:09:55 +0000 (22:09 +0300)
committerDmitry Gutov <dgutov@yandex.ru>
Fri, 15 May 2020 19:10:25 +0000 (22:10 +0300)
* lisp/progmodes/project.el (project-try-vc):
Use the absolute name of .git both times.

lisp/progmodes/project.el

index eeff809e2a3d196f091901c006851afebf477620..faa60d123fb4d153ba92a48d46c8e227f9d71c42 100644 (file)
@@ -1,7 +1,7 @@
 ;;; project.el --- Operations on the current project  -*- lexical-binding: t; -*-
 
 ;; Copyright (C) 2015-2020 Free Software Foundation, Inc.
-;; Version: 0.1.1
+;; Version: 0.1.2
 ;; Package-Requires: ((emacs "26.3"))
 
 ;; This is a GNU ELPA :core package.  Avoid using functionality that
@@ -275,14 +275,15 @@ 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)))
+                        (root (vc-root-dir))
+                        (gitfile (expand-file-name ".git" root)))
                    (vc-file-setprop
                     dir 'project-git-root
                     (cond
-                     ((file-directory-p (expand-file-name ".git" root))
+                     ((file-directory-p gitfile)
                       root)
                      ((with-temp-buffer
-                        (insert-file-contents ".git")
+                        (insert-file-contents gitfile)
                         (goto-char (point-min))
                         (looking-at "gitdir: [./]+/\.git/modules/"))
                       (let* ((parent (file-name-directory