mirror of
https://github.com/NixOS/nix.git
synced 2025-11-10 12:36:01 +01:00
addToStore, addToStoreFromDump: add references argument
Allow to pass a set of references to be added as info to the added paths.
This commit is contained in:
parent
4a2b7cc68c
commit
b9234142f5
11 changed files with 25 additions and 20 deletions
|
|
@ -237,7 +237,7 @@ StorePath Store::computeStorePathForText(const string & name, const string & s,
|
|||
|
||||
|
||||
StorePath Store::addToStore(const string & name, const Path & _srcPath,
|
||||
FileIngestionMethod method, HashType hashAlgo, PathFilter & filter, RepairFlag repair)
|
||||
FileIngestionMethod method, HashType hashAlgo, PathFilter & filter, RepairFlag repair, StorePathSet references)
|
||||
{
|
||||
Path srcPath(absPath(_srcPath));
|
||||
auto source = sinkToSource([&](Sink & sink) {
|
||||
|
|
@ -246,7 +246,7 @@ StorePath Store::addToStore(const string & name, const Path & _srcPath,
|
|||
else
|
||||
readFile(srcPath, sink);
|
||||
});
|
||||
return addToStoreFromDump(*source, name, method, hashAlgo, repair);
|
||||
return addToStoreFromDump(*source, name, method, hashAlgo, repair, references);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue