╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ──────────────╮ │src/ui/Repo/Patches.zig│ ╰───────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │384 }); │ │385 } │ │386 │ │387 -pub fn mergePatch(data: *const Self, session: *ui.Session, allocator: std.mem.Allocator, id: []const u8, revision: pch.MergeRevision) !void { │ │387 +pub fn mergePatch(data: *const Self, session: *ui.Session, allocator: std.mem.Allocator, id: []const u8, revision: evt.Patch.MergeRevision) !void {│ │388 const io = session.io orelse return error.NotFound; │ │389 const repos_dir = session.repos_dir orelse return error.NotFound; │ │390 const admin_repo = session.admin_repo orelse return error.NotFound; │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │755 const target_branch = item.record.event.target_branch; │ │756 const revision = item.record.event.revision orelse continue; │ │757 item.commit_count = revision.commit_count; │ │758 - item.revision_oid = switch (item.record.event.status) { │ │759 - .merged => |oid| oid, │ │760 - else => revision.source_oid, │ │758 + const merge_revision: evt.Patch.MergeRevision = switch (item.record.event.status) { │ │759 + .merged => |merged| merged.revision, │ │760 + else => .source, │ │761 }; │ │762 + item.revision_oid = switch (merge_revision) { │ │763 + .source => revision.source_oid, │ │764 + .squash => revision.squash_oid, │ │765 + }; │ │766 if (!item.fork_exists or status == .merged) { │ │767 const revision_id = try evt.parseEventId(&revision.id); │ │768 if (try evt.PatchRev.readById(evt.EventDB(repo_opts.hash), repo_opts.hash, haxy_moment, arena, &revision_id)) |record| {│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────╮ │770 } │ │771 } │ │772 if (status == .merged) { │ │769 - if (std.mem.eql(u8, item.revision_oid, revision.squash_oid)) item.commit_count = 1;│ │773 + if (merge_revision == .squash) item.commit_count = 1; │ │774 continue; │ │775 } │ │776 if (comptime repo_kind == .xit) { │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ───────────────╮ │src/ui/widget/thread.zig│ ╰────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │2685 .merge => if (comptime supports_merge) { │ │2686 if (comptime wasm) return; │ │2687 const entry = self.data.selectedThread() orelse return; │ │2688 - const revision: pch.MergeRevision = if (button_index > 1) .squash else .source; │ │2688 + const revision: evt.Patch.MergeRevision = if (button_index > 1) .squash else .source; │ │2689 if (!Data.canMerge(entry.*, self.session) or entry.mergeability.get(revision) != .clean) return; │ │2690 self.data.mergePatch(self.session, allocator, entry.id, revision) catch |err| switch (err) { │ │2691 error.MergeConflict, error.MergeCheckUnavailable, error.PatchOutOfDate, error.PatchDataUnavailable => {│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ──╮ │src/web.zig│ ╰───────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │774 allocator: std.mem.Allocator, │ │775 base: []const u8, │ │776 host: Host, │ │777 - revision: pch.MergeRevision, │ │777 + revision: evt.Patch.MergeRevision, │ │778 ) !void { │ │779 const parts = commentBaseParts(base) orelse return respondRemoveNotFound(request); │ │780 if (parts.thread_kind != .patch or parts.comment_id != null) return respondRemoveNotFound(request);│ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────╯