diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2021-04-24 21:20:25 +0200 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2021-04-24 21:20:25 +0200 |
commit | a511d2d1ef5fa07dde601961fe9394b474aad5ae (patch) | |
tree | 9dd7321cba6303583d044cae95ea622e96b55d45 /src/storage.cpp | |
parent | 9aaba1211c95dc7e08437a7cca73452181e296d6 (diff) |
Behavior lens for shared refs from local state
Diffstat (limited to 'src/storage.cpp')
-rw-r--r-- | src/storage.cpp | 10 |
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)) |