╭ changed ────╮ │src/patch.zig│ ╰─────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────╮ │110 }; │ │111 } │ │112 │ │113 -// refresh tracked branches and, on the server, check open patches for merges. │ │113 +// refresh open patches' tracked branches and, on the server, their mergeability.│ │114 // this runs outside the caller's transaction. │ │115 pub fn refreshBranches( │ │116 host_kind: evt.HostKind, │ ╰──────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │170 var id: [evt.event_id_size]u8 = undefined; │ │171 if ((try id_pair.key_cursor.readBytes(&id)).len != id.len) return error.InvalidPatch; │ │172 const record = (try evt.Patch.readById(DB, repo_opts.hash, moment, &arena, &id)) orelse continue; │ │173 + if (record.removed or record.event.status.kind() != .open) continue; │ │174 if (conflicts) |map| if (try map.getCursor(&evt.orderKeyDesc(record.created_order, &id)) != null) continue;│ │175 if (record.event.revision) |revision| if (std.mem.eql(u8, revision.source_oid, &source)) continue; │ │176 try patches.put(allocator, id, record); │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯