Skip to content
Snippets Groups Projects
Unverified Commit cbc21691 authored by Shea Levy's avatar Shea Levy
Browse files

fetchgit: Remove incomplete/unneeded ref check.

This check fails for tags and branches, and is made redundant by the
checks git itself will do when fetching the repo.
parent 8522db16
No related branches found
No related tags found
No related merge requests found
...@@ -19,11 +19,6 @@ Path exportGit(ref<Store> store, const std::string & uri, ...@@ -19,11 +19,6 @@ Path exportGit(ref<Store> store, const std::string & uri,
throw Error("invalid Git revision '%s'", rev); throw Error("invalid Git revision '%s'", rev);
} }
// FIXME: too restrictive, but better safe than sorry.
std::regex refRegex("^[0-9a-zA-Z][0-9a-zA-Z.-]+$");
if (!std::regex_match(ref, refRegex))
throw Error("invalid Git ref '%s'", ref);
Path cacheDir = getCacheDir() + "/nix/git"; Path cacheDir = getCacheDir() + "/nix/git";
if (!pathExists(cacheDir)) { if (!pathExists(cacheDir)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment