summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/storage.cpp2
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))