Skip to content

Commit

Permalink
fetchgit: Remove incomplete/unneeded ref check.
Browse files Browse the repository at this point in the history
This check fails for tags and branches, and is made redundant by the
checks git itself will do when fetching the repo.
  • Loading branch information
shlevy committed Oct 17, 2017
1 parent 8522db1 commit cbc2169
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/libexpr/primops/fetchgit.cc
Expand Up @@ -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)) {
Expand Down

0 comments on commit cbc2169

Please sign in to comment.