Merge pull request #3730 from obsidiansystems/better-ca-parse-errors

Improve hash parsing and errors
This commit is contained in:
Eelco Dolstra
2020-08-05 16:33:07 +02:00
committed by GitHub
23 changed files with 193 additions and 102 deletions
+1 -1
View File
@@ -31,7 +31,7 @@ static void prim_fetchMercurial(EvalState & state, const Pos & pos, Value * * ar
// be both a revision or a branch/tag name.
auto value = state.forceStringNoCtx(*attr.value, *attr.pos);
if (std::regex_match(value, revRegex))
rev = Hash(value, htSHA1);
rev = Hash::parseAny(value, htSHA1);
else
ref = value;
}