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:
parent
9e50e648a4
commit
07b4399fb6
3 changed files with 28 additions and 6 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue