╭ changed ───────────╮ │src/ui/Repo/Diff.zig│ ╰────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │30 const Self = @This(); │ │31 │ │32 pub const Route = union(enum) { │ │33 - commit: struct { location: ui.RoutablePage.RepoLocation, oid: []const u8, base_oid: []const u8 = "" }, │ │33 repo: struct { identity: []const u8, ref_or_oid: ui.RoutablePage.RefOrOid, value: []const u8, base_oid: []const u8 },│ │34 patchrev: struct { identity: []const u8, id: []const u8 }, │ │36 - fork: struct { identity: []const u8, id: []const u8 }, │ │35 + // `oid` names one commit's diff against `base_oid` ("" = the whole patch) │ │36 + fork: struct { identity: []const u8, id: []const u8, oid: []const u8 = "", base_oid: []const u8 = "" }, │ │37 │ │38 pub fn page(self: Route, start: usize, path: []const u8) ?ui.RoutablePage { │ │39 return switch (self) { │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │40 - .commit => |c| c.location.commitsRoute(.object, c.oid, start, path, c.base_oid), │ │40 .repo => |r| ui.RoutablePage.repoDiffRoute(r.identity, r.ref_or_oid, r.value, start, path, r.base_oid),│ │41 .patchrev => |r| ui.RoutablePage.repoPatchRevDiffRoute(r.identity, r.id, start, path), │ │43 - .fork => |f| ui.RoutablePage.forkDiffRoute(f.identity, f.id, start, path), │ │42 + .fork => |f| ui.RoutablePage.forkDiffRoute(f.identity, f.id, f.oid, f.base_oid, start, path), │ │43 }; │ │44 } │ │45 │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │204 }; │ │205 } │ │206 │ │208 -pub fn appendWindow(data: @This(), allocator: std.mem.Allocator, session: *ui.Session, box: *wgt.Box(ui.Widget)) !void {│ │207 +fn appendWindow(data: @This(), allocator: std.mem.Allocator, session: *ui.Session, box: *wgt.Box(ui.Widget)) !void { │ │208 if (data.path.len != 0) { │ │209 try addLink(allocator, box, data.path, ""); │ │210 try addLink(allocator, box, "← all files", try data.route.link(session.page_arena, 0, "")); │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯