From a511d2d1ef5fa07dde601961fe9394b474aad5ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Sat, 24 Apr 2021 21:20:25 +0200 Subject: Behavior lens for shared refs from local state --- src/storage.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/storage.cpp') 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::create(const Storage & st, const Digest & digest) { if (!st.p->backend->contains(digest)) -- cgit v1.2.3