aboutsummaryrefslogtreecommitdiff
path: root/src/libfetchers
diff options
context:
space:
mode:
authorDaniel Pauls <daniel1708.de+git@gmail.com>2022-04-09 17:00:14 +0200
committerDaniel Pauls <daniel1708.de+git@gmail.com>2022-04-09 17:00:14 +0200
commit770f7371f33a56f7214001981a698113477ccec4 (patch)
tree59e8d18d3d77bbf8590218de724ae3a7e2756c2a /src/libfetchers
parent646af7325d93f98802b989f8a8e008a25f7a4788 (diff)
libfetchers: Replace regex to clarify intent
Diffstat (limited to 'src/libfetchers')
-rw-r--r--src/libfetchers/git.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/libfetchers/git.cc b/src/libfetchers/git.cc
index f8433bc28..91dd332a2 100644
--- a/src/libfetchers/git.cc
+++ b/src/libfetchers/git.cc
@@ -28,9 +28,7 @@ static std::string readHead(const Path & path)
static bool isNotDotGitDirectory(const Path & path)
{
- static const std::regex gitDirRegex("^(?:.*/)?\\.git$");
-
- return not std::regex_match(path, gitDirRegex);
+ return baseNameOf(path) != ".git";
}
struct GitInputScheme : InputScheme