1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-27 20:51:00 +01:00

* `nix-store -q --hash' to quickly query the hash of the contents of a

store path (which is stored in the database).
This commit is contained in:
Eelco Dolstra 2005-03-02 15:57:06 +00:00
parent 9e50e648a4
commit 07b4399fb6
3 changed files with 28 additions and 6 deletions

View file

@ -509,6 +509,14 @@ static Hash queryHash(const Transaction & txn, const Path & storePath)
}
Hash queryPathHash(const Path & path)
{
if (!isValidPath(path))
throw Error(format("path `%1%' is not valid") % path);
return queryHash(noTxn, path);
}
void registerValidPath(const Transaction & txn,
const Path & _path, const Hash & hash, const PathSet & references,
const Path & deriver)