╭ changed ───────────╮ │src/ui/Repo/Refs.zig│ ╰────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │71 // open with the arena's backing allocator (transient; the ref names are │ │72 // duped into the page arena so they outlive the repo handle). │ │73 const gpa = arena.child_allocator; │ │74 - var repo = rp.Repo(.xit, .{}).open(io, gpa, .{ .path = repo_path }) catch return empty; │ │75 - defer repo.deinit(io, gpa); │ │74 + var any_repo = rp.AnyRepo(.xit, .{}).open(io, gpa, .{ .path = repo_path }) catch return empty; │ │75 + defer any_repo.deinit(io, gpa); │ │76 │ │77 - var branch_iter = repo.listBranches(io, gpa, .{ .index = branches_after }) catch return empty; │ │78 - defer branch_iter.deinit(io); │ │79 - const branches = try collectWindow(io, aa, &branch_iter, branches_after); │ │77 + const branches, const tags = switch (any_repo) { │ │78 + inline else => |*repo| blk: { │ │79 + var branch_iter = repo.listBranches(io, gpa, .{ .index = branches_after }) catch return empty;│ │80 + defer branch_iter.deinit(io); │ │81 + const b = try collectWindow(io, aa, &branch_iter, branches_after); │ │82 │ │81 - var tag_iter = repo.listTags(io, gpa, .{ .index = tags_after }) catch return empty; │ │82 - defer tag_iter.deinit(io); │ │83 - const tags = try collectWindow(io, aa, &tag_iter, tags_after); │ │83 + var tag_iter = repo.listTags(io, gpa, .{ .index = tags_after }) catch return empty; │ │84 + defer tag_iter.deinit(io); │ │85 + const t = try collectWindow(io, aa, &tag_iter, tags_after); │ │86 + break :blk .{ b, t }; │ │87 + }, │ │88 + }; │ │89 │ │90 return .{ │ │91 .identity = empty.identity, │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │379 .branch => .branch, │ │380 .tag => .tag, │ │381 }; │ │377 - const value = try ui.ResolvedRefOrOid.urlEncode(aa, name); │ │382 + const value = try ui.urlEncodeRef(aa, name); │ │383 const route = ui.RoutablePage.repoFilesRoute(identity, ref_or_oid, value, "", 0) orelse return error.RouteTooLong;│ │384 const url = try route.urlAlloc(page_arena); │ │385 return std.fmt.allocPrint(aa, "a:{s}", .{url}); │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯