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.
This commit is contained in:
Shea Levy 2017-10-16 13:25:24 -04:00
parent 8522db1641
commit cbc216911d
No known key found for this signature in database
GPG key ID: 5C0BD6957D86FE27

View file

@ -19,11 +19,6 @@ Path exportGit(ref<Store> store, const std::string & uri,
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";
if (!pathExists(cacheDir)) {