╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ Commits.zig ──────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭ find file ─ ─ ─ ─ ─ ─ ─ ─ ─ ─╮ ╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─╮ │ │ │http│ ssh │ │ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─╯ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─╯
873 // a result roots the same results page at its commit, so the query 874 // survives following the row 875 if (data.search != null) { 876 const route = pageRoute(data, commit.oid) orelse return error.RouteTooLong; 877 return page_arena.allocator().print("ai:{s}", .{try route.toUrl(page_arena)}); 878 } 879 const route = (if (message) 880 data.handle.location.commitMessageRoute(.object, commit.oid, data.base_oid) 881 else 882 data.handle.location.commitsRoute(.object, commit.oid, data.base_oid)) orelse return error.RouteTooLong; 883 const url = try route.toUrl(page_arena); 884 return page_arena.allocator().print("ai:{s}", .{url}); 885 } 886 887 // the "a:" link to the page showing `oid`'s message on its own. 888 fn messageLink(page_arena: *std.heap.ArenaAllocator, data: *const Self, oid: []const u8) ![]const u8 { 889 const route = data.handle.location.commitMessageRoute(.object, oid, data.base_oid) orelse return error.RouteTooLong; 890 const url = try route.toUrl(page_arena); 891 return page_arena.allocator().print("a:{s}", .{url}); 892 } 893