diff options
-rw-r--r-- | src/storage.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/storage.cpp b/src/storage.cpp index b5bff8c..45caadb 100644 --- a/src/storage.cpp +++ b/src/storage.cpp @@ -660,7 +660,7 @@ bool Storage::replaceHead(UUID type, UUID id, const Ref & old, const Ref & ref) optional<Ref> Storage::updateHead(UUID type, UUID id, const Ref & old, const std::function<Ref(const Ref &)> & f) { Ref r = f(old); - if (replaceHead(type, id, old, r)) + if (r.digest() == old.digest() || replaceHead(type, id, old, r)) return r; if (auto cur = old.storage().headRef(type, id)) |