summaryrefslogtreecommitdiff
path: root/src/storage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/storage.cpp')
-rw-r--r--src/storage.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/storage.cpp b/src/storage.cpp
index bd0beae..f68cb68 100644
--- a/src/storage.cpp
+++ b/src/storage.cpp
@@ -928,6 +928,16 @@ const PartialStorage & PartialRef::storage() const
return *p->storage;
}
+bool Ref::operator==(const Ref & other) const
+{
+ return p->digest == other.p->digest;
+}
+
+bool Ref::operator!=(const Ref & other) const
+{
+ return p->digest != other.p->digest;
+}
+
optional<Ref> Ref::create(const Storage & st, const Digest & digest)
{
if (!st.p->backend->contains(digest))