diff options
| author | Dmitry Gutov | 2020-05-15 22:09:55 +0300 |
|---|---|---|
| committer | Dmitry Gutov | 2020-05-15 22:10:25 +0300 |
| commit | afca37343d0637386e4dfc4fb04d8700f3c6bf0d (patch) | |
| tree | f59bbb214d95c873c86f17b40a5bf1d9877f6b1d | |
| parent | b5ec24a4f14c9684506d5616ac1fa5a83b0d1392 (diff) | |
| download | emacs-afca37343d0637386e4dfc4fb04d8700f3c6bf0d.tar.gz emacs-afca37343d0637386e4dfc4fb04d8700f3c6bf0d.zip | |
Fix Git submodules detection breakage
* lisp/progmodes/project.el (project-try-vc):
Use the absolute name of .git both times.
| -rw-r--r-- | lisp/progmodes/project.el | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index eeff809e2a3..faa60d123fb 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | ;;; project.el --- Operations on the current project -*- lexical-binding: t; -*- | 1 | ;;; project.el --- Operations on the current project -*- lexical-binding: t; -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2015-2020 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2015-2020 Free Software Foundation, Inc. |
| 4 | ;; Version: 0.1.1 | 4 | ;; Version: 0.1.2 |
| 5 | ;; Package-Requires: ((emacs "26.3")) | 5 | ;; Package-Requires: ((emacs "26.3")) |
| 6 | 6 | ||
| 7 | ;; This is a GNU ELPA :core package. Avoid using functionality that | 7 | ;; This is a GNU ELPA :core package. Avoid using functionality that |
| @@ -275,14 +275,15 @@ backend implementation of `project-external-roots'.") | |||
| 275 | ;; Don't stop at submodule boundary. | 275 | ;; Don't stop at submodule boundary. |
| 276 | (or (vc-file-getprop dir 'project-git-root) | 276 | (or (vc-file-getprop dir 'project-git-root) |
| 277 | (let* ((default-directory dir) | 277 | (let* ((default-directory dir) |
| 278 | (root (vc-root-dir))) | 278 | (root (vc-root-dir)) |
| 279 | (gitfile (expand-file-name ".git" root))) | ||
| 279 | (vc-file-setprop | 280 | (vc-file-setprop |
| 280 | dir 'project-git-root | 281 | dir 'project-git-root |
| 281 | (cond | 282 | (cond |
| 282 | ((file-directory-p (expand-file-name ".git" root)) | 283 | ((file-directory-p gitfile) |
| 283 | root) | 284 | root) |
| 284 | ((with-temp-buffer | 285 | ((with-temp-buffer |
| 285 | (insert-file-contents ".git") | 286 | (insert-file-contents gitfile) |
| 286 | (goto-char (point-min)) | 287 | (goto-char (point-min)) |
| 287 | (looking-at "gitdir: [./]+/\.git/modules/")) | 288 | (looking-at "gitdir: [./]+/\.git/modules/")) |
| 288 | (let* ((parent (file-name-directory | 289 | (let* ((parent (file-name-directory |