╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ Commits.zig ──────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │http│ ssh │ │ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
764 }; 765 766 // the "a:" navigation link for the commits page starting at `start_oid` within 767 // `identity`, showing the selected commit's first `after` hunks (0 = default). 768 fn commitsLink(page_arena: *std.heap.ArenaAllocator, identity: []const u8, start_oid: []const u8, after: usize) ![]const u8 { 769 const route = ui.RoutablePage.repoCommitsRoute(identity, start_oid, after) orelse return error.RouteTooLong; 770 const url = try route.urlAlloc(page_arena); 771 return std.fmt.allocPrint(page_arena.allocator(), "a:{s}", .{url}); 772 } 773 774 // the in-page "ai:" anchor for selecting `oid` in `identity`'s commit list. it 775 // points at the same route as commitsLink but the "ai:" prefix keeps wasm clicks 776 // in-page (crossPageLink ignores it); the href is only followed with js off. 777 fn commitRowLink(page_arena: *std.heap.ArenaAllocator, identity: []const u8, oid: []const u8) ![]const u8 { 778 const route = ui.RoutablePage.repoCommitsRoute(identity, oid, 0) orelse return error.RouteTooLong; 779 const url = try route.urlAlloc(page_arena); 780 return std.fmt.allocPrint(page_arena.allocator(), "ai:{s}", .{url}); 781 } 782