aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/make-content-addressed.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore/make-content-addressed.cc')
-rw-r--r--src/libstore/make-content-addressed.cc11
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;
+}
+
}