MCPcopy Create free account
hub / github.com/appdevforall/CodeOnTheGo / validate_repo_name

Function validate_repo_name

subprojects/llama.cpp/common/download.cpp:56–59  ·  view source on GitHub ↗

validate repo name format: owner/repo

Source from the content-addressed store, hash-verified

54
55// validate repo name format: owner/repo
56static bool validate_repo_name(const std::string & repo) {
57 static const std::regex repo_regex(R"(^[A-Za-z0-9_.\-]+\/[A-Za-z0-9_.\-]+$)");
58 return std::regex_match(repo, repo_regex);
59}
60
61static std::string get_manifest_path(const std::string & repo, const std::string & tag) {
62 // we use "=" to avoid clashing with other component, while still being allowed on windows

Callers 1

get_manifest_pathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected