about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorShea Levy <shea@shealevy.com>2017-10-16T17·25-0400
committerShea Levy <shea@shealevy.com>2017-10-17T16·30-0400
commitcbc216911dbda23c3bc050c969bc725fe60760ef (patch)
tree832d371e1432caab0c73688645e578cd3595f5c6 /src
parent8522db1641c2d78f20644b8fa0090d4371f14a75 (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/libexpr/primops/fetchgit.cc5
1 files changed, 0 insertions, 5 deletions
diff --git a/src/libexpr/primops/fetchgit.cc b/src/libexpr/primops/fetchgit.cc
index 545954f58430..9db4adbc9da2 100644
--- a/src/libexpr/primops/fetchgit.cc
+++ b/src/libexpr/primops/fetchgit.cc
@@ -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)) {