about summary refs log tree commit diff
path: root/src/libstore/store-api.cc
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2016-02-15T13·48+0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2016-02-15T14·01+0100
commitc8f4d89a345cc06b64b0137e15567ec41c00881c (patch)
tree20e7211ba624e404fa8226be6d40b9f7f4526cf9 /src/libstore/store-api.cc
parente03d6e09983bb5ad99352933c4d2f21b139294d2 (diff)
Expose the export magic value and move LocalStore::queryReferences to Store
Diffstat (limited to 'src/libstore/store-api.cc')
-rw-r--r--src/libstore/store-api.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libstore/store-api.cc b/src/libstore/store-api.cc
index 2f44401827f0..54b6c2b5cc52 100644
--- a/src/libstore/store-api.cc
+++ b/src/libstore/store-api.cc
@@ -224,6 +224,13 @@ Path computeStorePathForText(const string & name, const string & s,
 }
 
 
+void Store::queryReferences(const Path & path, PathSet & references)
+{
+    ValidPathInfo info = queryPathInfo(path);
+    references.insert(info.references.begin(), info.references.end());
+}
+
+
 /* Return a string accepted by decodeValidPathInfo() that
    registers the specified paths as valid.  Note: it's the
    responsibility of the caller to provide a closure. */