mirror of
https://github.com/NixOS/nix
synced 2025-06-27 08:31:16 +02:00
Merge pull request #3730 from obsidiansystems/better-ca-parse-errors
Improve hash parsing and errors
This commit is contained in:
commit
b91dc7ebad
23 changed files with 193 additions and 102 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue