aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2020-05-15 17:30:47 -0400
committerStefan Monnier2020-05-15 17:30:47 -0400
commitdba8f3783b209fef5be2589528ed43a99a8bab6a (patch)
tree0394433093cabb4ab07488e61641b4dac28120be
parent4307a84fd8cb57934f45ee4450c91c08bb86b4a3 (diff)
downloademacs-dba8f3783b209fef5be2589528ed43a99a8bab6a.tar.gz
emacs-dba8f3783b209fef5be2589528ed43a99a8bab6a.zip
* lisp/progmodes/project.el (project-try-vc): Fix regexp typo.
-rw-r--r--lisp/progmodes/project.el11
1 files changed, 10 insertions, 1 deletions
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index 0ce2786a4dd..2092d692b50 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -273,6 +273,13 @@ backend implementation of `project-external-roots'.")
273 (pcase backend 273 (pcase backend
274 ('Git 274 ('Git
275 ;; Don't stop at submodule boundary. 275 ;; Don't stop at submodule boundary.
276 ;; Note: It's not necessarily clear-cut what should be
277 ;; considered a "submodule" in the sense that some users
278 ;; may setup things equivalent to "git-submodule"s using
279 ;; "git worktree" instead (for example).
280 ;; FIXME: Also it may be the case that some users would consider
281 ;; a submodule as its own project. So there's a good chance
282 ;; we will need to let the user tell us what is their intention.
276 (or (vc-file-getprop dir 'project-git-root) 283 (or (vc-file-getprop dir 'project-git-root)
277 (let* ((root (vc-call-backend backend 'root dir)) 284 (let* ((root (vc-call-backend backend 'root dir))
278 (gitfile (expand-file-name ".git" root))) 285 (gitfile (expand-file-name ".git" root)))
@@ -284,7 +291,9 @@ backend implementation of `project-external-roots'.")
284 ((with-temp-buffer 291 ((with-temp-buffer
285 (insert-file-contents gitfile) 292 (insert-file-contents gitfile)
286 (goto-char (point-min)) 293 (goto-char (point-min))
287 (looking-at "gitdir: [./]+/\.git/modules/")) 294 ;; Kind of a hack to distinguish a submodule from
295 ;; other cases of .git files pointing elsewhere.
296 (looking-at "gitdir: [./]+/\\.git/modules/"))
288 (let* ((parent (file-name-directory 297 (let* ((parent (file-name-directory
289 (directory-file-name root)))) 298 (directory-file-name root))))
290 (vc-call-backend backend 'root parent))) 299 (vc-call-backend backend 'root parent)))