Commit 0e6cc9c1 authored by Sébastien Blin's avatar Sébastien Blin

conversationrepository: do not revalidate commits if already validated

This can re-generate MessageReceived for already received messages. If we
are not behind from, this means we are up-to-date and no-need to re-announce.

Change-Id: I890ec20117235aeec56e4a7d3f720c1193e9633c
parent 86f8cb28
......@@ -1468,13 +1468,16 @@ ConversationRepository::Impl::behind(const std::string& from) const
}
for (std::size_t i = 0; i < bases.count; ++i) {
std::string oid = git_oid_tostr_s(&bases.ids[i]);
if (oid != from && oid != head) {
if (oid != head) {
oid_local = bases.ids[i];
break;
}
}
git_oidarray_free(&bases);
return log(from, git_oid_tostr_s(&oid_local), 0);
std::string to = git_oid_tostr_s(&oid_local);
if (to == from)
return {};
return log(from, to, 0);
}
std::vector<ConversationCommit>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment