1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-12 05:26:02 +01:00

libfetchers/github: allow slashes in refs

Refs #4061
This commit is contained in:
Maximilian Bosch 2020-10-06 20:08:51 +02:00
parent ad143c5b3b
commit 59f2dd8e8d
No known key found for this signature in database
GPG key ID: 091DBF4D1FC46B8E
2 changed files with 18 additions and 4 deletions

View file

@ -22,7 +22,7 @@ const static std::string absPathRegex = "(?:(?:/" + segmentRegex + ")*/?)";
const static std::string pathRegex = "(?:" + segmentRegex + "(?:/" + segmentRegex + ")*/?)";
// A Git ref (i.e. branch or tag name).
const static std::string refRegexS = "[a-zA-Z0-9][a-zA-Z0-9_.-]*"; // FIXME: check
const static std::string refRegexS = "[a-zA-Z0-9][a-zA-Z0-9_.\\/-]*"; // FIXME: check
extern std::regex refRegex;
// Instead of defining what a good Git Ref is, we define what a bad Git Ref is