╭ changed ────╮ │build.zig.zon│ ╰─────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────╮ │ 3 .version = "0.0.0", │ │ 4 .dependencies = .{ │ │ 5 .xit = .{ │ │ 6 - .url = "git+https://github.com/xit-vcs/xit#f2cb14a3eb1fe26c91fd1b57e7ef738d243c40d7",│ │ 7 - .hash = "xit-0.0.0-Ub3nDCrwTwH3EzuMbizWrKLcBT8eAJwmUpAPKYyRufaB", │ │ 6 + .url = "git+https://github.com/xit-vcs/xit#0d4a1d01109ba9f028e2a1f203573e83ff6e28cd",│ │ 7 + .hash = "xit-0.0.0-Ub3nDIvvTwFgk-uwVrHVGC6P9a6lp5XhUILilG6qy1nS", │ │ 8 }, │ │ 9 }, │ │10 .paths = .{ │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ───────────╮ │src/ui/Repo/Refs.zig│ ╰────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────╮ │74 var repo = rp.Repo(.xit, .{}).open(io, gpa, .{ .path = repo_path }) catch return empty; │ │75 defer repo.deinit(io, gpa); │ │76 │ │77 - var branch_iter = repo.listBranches(io, gpa) catch return empty; │ │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); │ │80 │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────╮ │81 - var tag_iter = repo.listTags(io, gpa) catch return empty; │ │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); │ │84 │ ╰───────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────╮ │ 95 }; │ │ 96 } │ │ 97 │ │ 98 -// window a ref iterator without materializing the whole list: skip the prior │ │ 99 -// windows, take this window's names into the page arena (`aa`), then peek one │ │100 -// more to learn whether a "next →" window exists. │ │ 98 +// window a ref iterator without materializing the whole list │ │ 99 fn collectWindow(io: std.Io, aa: std.mem.Allocator, iter: anytype, after: usize) !Window {│ │102 - var skipped: usize = 0; │ │103 - while (skipped < after) : (skipped += 1) { │ │104 - if (try iter.next(io) == null) return .{ .names = &.{}, .next_after = null }; │ │105 - } │ │100 var names = try std.ArrayListUnmanaged([]const u8).initCapacity(aa, page_size); │ │101 while (names.items.len < page_size) { │ │102 const ref = try iter.next(io) orelse break; │ ╰───────────────────────────────────────────────────────────────────────────────────────────────╯