From 04610567327551351add407b3de74106215e5165 Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Wed, 7 Apr 2021 09:56:07 +0300 Subject: [Fix #1659] Use projectile-acquire-root in projectile-project-vcs --- CHANGELOG.md | 1 + projectile.el | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 634223d..2d3e595 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ * [#1450](https://github.com/bbatsov/projectile/pull/1450): Call `switch-project-action` within project's temp buffer. * [#1340](https://github.com/bbatsov/projectile/pull/1340): Fix remote projects being removed if TRAMP can't connect. * [#1655](https://github.com/bbatsov/projectile/pull/1655): Fix `projectile-replace-regexp` searching the wrong files when called with prefix arg. +* [#1659](https://github.com/bbatsov/projectile/issues/1659): Fix `projectile-project-vcs` to work outside a project. ## 2.3.0 (2020-11-27) diff --git a/projectile.el b/projectile.el index 40649de..0480063 100644 --- a/projectile.el +++ b/projectile.el @@ -3008,7 +3008,7 @@ Expands wildcards using `file-expand-wildcards' before checking." "Determine the VCS used by the project if any. PROJECT-ROOT is the targeted directory. If nil, use `projectile-project-root'." - (or project-root (setq project-root (projectile-project-root))) + (or project-root (setq project-root (projectile-acquire-root))) (cond ;; first we check for a VCS marker in the project root itself ((projectile-file-exists-p (expand-file-name ".git" project-root)) 'git) -- cgit v1.0