libfetchers: Replace regex to clarify intent

This commit is contained in:
Daniel Pauls 2022-04-09 17:00:14 +02:00
parent 646af7325d
commit 770f7371f3

View file

@ -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