diff options
author | Robert Hensing <robert@roberthensing.nl> | 2023-06-05 11:37:41 +0200 |
---|---|---|
committer | Robert Hensing <robert@roberthensing.nl> | 2023-06-30 18:22:47 +0200 |
commit | 55888633dd323c83cd1db3773d82dc954da34888 (patch) | |
tree | 426c71d523bd5ee7c9b6b06ab6cb3971b755d5ff /src/libstore/make-content-addressed.cc | |
parent | 8dca95386c9ab8b13886716ec31e1b2936a3ef10 (diff) |
makeContentAddressed: Add single path helper
Diffstat (limited to 'src/libstore/make-content-addressed.cc')
-rw-r--r-- | src/libstore/make-content-addressed.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/libstore/make-content-addressed.cc b/src/libstore/make-content-addressed.cc index 53fe04704..626a22480 100644 --- a/src/libstore/make-content-addressed.cc +++ b/src/libstore/make-content-addressed.cc @@ -80,4 +80,15 @@ std::map<StorePath, StorePath> makeContentAddressed( return remappings; } +StorePath makeContentAddressed( + Store & srcStore, + Store & dstStore, + const StorePath & fromPath) +{ + auto remappings = makeContentAddressed(srcStore, dstStore, StorePathSet { fromPath }); + auto i = remappings.find(fromPath); + assert(i != remappings.end()); + return i->second; +} + } |