╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ──────────────╮ │src/ui/Repo/Commits.zig│ ╰───────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │589 } │ │590 │ │591 try (Diff{ │ │587 - .route = .{ .commit = .{ .location = self.data.location, .oid = commit.oid } }, │ │592 + .route = .{ .commit = .{ .location = self.data.location, .oid = commit.oid, .base_oid = self.data.base_oid } },│ │593 .path = d.path, │ │594 .window = commit.window, │ │595 }).appendWindow(allocator, self.session, inner); │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │641 .enter => if (self.selectedCommitIndex() != null) │ │642 self.focusDiff(root_focus) │ │643 else if (self.data.next_start) |next| { │ │639 - if (self.data.location.commitsRoute(.object, next, 0, "")) |route| │ │644 + if (self.data.location.commitsRoute(.object, next, 0, "", self.data.base_oid)) |route|│ │645 try self.session.navigate(route); │ │646 }, │ │647 .arrow_right => self.focusDiff(root_focus), │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │698 }; │ │699 │ │700 // the "a:" navigation link for the commits page walking from commit `oid` within │ │696 -// `location`, windowing the selected commit's diff from hunk `start`, filtered │ │701 +// `data.location`, windowing the selected commit's diff from hunk `start`, filtered │ │702 // to `path` ("" = every file). │ │698 -fn commitsLink(page_arena: *std.heap.ArenaAllocator, location: ui.RoutablePage.RepoLocation, oid: []const u8, start: usize, path: []const u8) ![]const u8 {│ │699 - const route = location.commitsRoute(.object, oid, start, path) orelse return error.RouteTooLong; │ │703 +fn commitsLink(page_arena: *std.heap.ArenaAllocator, data: *const Self, oid: []const u8, start: usize, path: []const u8) ![]const u8 { │ │704 + const route = data.location.commitsRoute(.object, oid, start, path, data.base_oid) orelse return error.RouteTooLong; │ │705 const url = try route.toUrl(page_arena); │ │706 return std.fmt.allocPrint(page_arena.allocator(), "a:{s}", .{url}); │ │707 } │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │716 │ │717 // the in-page "ai:" anchor for selecting a commit with its current pane content │ │718 // and window. the href is only followed with js off. │ │714 -fn commitRowLink(page_arena: *std.heap.ArenaAllocator, location: ui.RoutablePage.RepoLocation, commit: Commit, content: Content) ![]const u8 {│ │719 +fn commitRowLink(page_arena: *std.heap.ArenaAllocator, data: *const Self, commit: Commit, content: Content) ![]const u8 { │ │720 const route = (switch (content) { │ │716 - .message => location.commitMessageRoute(.object, commit.oid), │ │717 - .diff => |diff| location.commitsRoute(.object, commit.oid, commit.window.start, diff.path), │ │721 + .message => data.location.commitMessageRoute(.object, commit.oid, data.base_oid), │ │722 + .diff => |diff| data.location.commitsRoute(.object, commit.oid, commit.window.start, diff.path, data.base_oid), │ │723 }) orelse return error.RouteTooLong; │ │724 const url = try route.toUrl(page_arena); │ │725 return std.fmt.allocPrint(page_arena.allocator(), "ai:{s}", .{url}); │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │726 } │ │727 │ │728 // the "a:" link to the page showing `oid`'s message on its own. │ │724 -fn messageLink(page_arena: *std.heap.ArenaAllocator, location: ui.RoutablePage.RepoLocation, oid: []const u8) ![]const u8 {│ │725 - const route = location.commitMessageRoute(.object, oid) orelse return error.RouteTooLong; │ │729 +fn messageLink(page_arena: *std.heap.ArenaAllocator, data: *const Self, oid: []const u8) ![]const u8 { │ │730 + const route = data.location.commitMessageRoute(.object, oid, data.base_oid) orelse return error.RouteTooLong; │ │731 const url = try route.toUrl(page_arena); │ │732 return std.fmt.allocPrint(page_arena.allocator(), "a:{s}", .{url}); │ │733 } │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ───────────╮ │src/ui/Repo/Diff.zig│ ╰────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │27 const Self = @This(); │ │28 │ │29 pub const Route = union(enum) { │ │30 - commit: struct { location: ui.RoutablePage.RepoLocation, oid: []const u8 }, │ │30 + commit: struct { location: ui.RoutablePage.RepoLocation, oid: []const u8, base_oid: []const u8 = "" },│ │31 fork: struct { identity: []const u8, id: []const u8 }, │ │32 │ │33 fn link(self: Route, arena: *std.heap.ArenaAllocator, start: usize, path: []const u8) ![]const u8 { │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────╮ │34 const route = switch (self) { │ │35 - .commit => |c| c.location.commitsRoute(.object, c.oid, start, path), │ │35 + .commit => |c| c.location.commitsRoute(.object, c.oid, start, path, c.base_oid),│ │36 .fork => |f| ui.RoutablePage.forkDiffRoute(f.identity, f.id, start, path), │ │37 } orelse return error.RouteTooLong; │ │38 return std.fmt.allocPrint(arena.allocator(), "a:{s}", .{try route.toUrl(arena)}); │ ╰────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ─────────────╮ │src/ui/Repo/Header.zig│ ╰──────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │50 first_group_width: usize, │ │51 session: *ui.Session, │ │52 │ │53 - pub fn init(allocator: std.mem.Allocator, data: *const Self, commit_count: ?u64, session: *ui.Session) !View { │ │53 + pub fn init(allocator: std.mem.Allocator, data: *const Self, commit_count: ?u64, base_oid: []const u8, session: *ui.Session) !View {│ │54 var box = try wgt.Box(ui.Widget).init(allocator, .{ .border_style = .hidden, .rounded_corners = true, .direction = .horiz }); │ │55 errdefer box.deinit(allocator); │ │56 │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │136 const current_tag = std.meta.activeTag(current_page); │ │137 const files_route = ui.RoutablePage.repoFilesRoute(identity, data.ref_or_oid, data.ref_or_oid_value, "", 0) orelse return error.RouteTooLong; │ │138 const files_link = try ui.inPageTabLink(session, files_route, current_tag == .repo_files); │ │139 - const commits_route = ui.RoutablePage.repoCommitsRoute(identity, data.ref_or_oid, data.ref_or_oid_value, 0, "") orelse return error.RouteTooLong; │ │139 + const commits_route = ui.RoutablePage.repoCommitsRoute(identity, data.ref_or_oid, data.ref_or_oid_value, 0, "", base_oid) orelse return error.RouteTooLong;│ │140 const commits_link = try ui.inPageTabLink(session, commits_route, current_tag == .repo_commits); │ │141 const refs_route = ui.RoutablePage.repoRefsRoute(identity, .branch, "") orelse return error.RouteTooLong; │ │142 const refs_link = try ui.inPageTabLink(session, refs_route, current_tag == .repo_refs); │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ──────────────╮ │src/ui/Repo/Patches.zig│ ╰───────────────────────╯ ╭───────────────────────────────────────────────────────╮ │157 attachments: []const Attachment.WithId = &.{},│ │158 draft: bool = false, │ │159 revision_oid: []const u8 = "", │ │160 + base_oid: []const u8 = "", │ │161 commit_count: ?u64 = null, │ │162 no_changes: bool = false, │ │163 fork_exists: bool = false, │ ╰───────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯