╭ changed ───────────────╮ │src/test/event/patch.zig│ ╰────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │291 } │ │292 const diff_after = try ui.Repo.Diff.init(.xit, opts, &arena, &repo, io, allocator, diff_route.repo_diff); │ │293 try std.testing.expectEqualDeep(diff_before.window, diff_after.window); │ │294 - const files = try ui.Repo.Files.initPatchRev(.xit, opts, &arena, &repo, io, allocator, .{ .repo = "" }, &merged_status.patchrev_id, "base.txt", 0); │ │294 + const files = try ui.Repo.Files.initPatchRev(.xit, opts, &arena, &repo, io, allocator, .{ .location = .{ .repo = "" } }, &merged_status.patchrev_id, "base.txt", 0);│ │295 try std.testing.expectEqual(2, files.entries.len); │ │296 try std.testing.expectEqualStrings("base.txt", files.entries[0].name); │ │297 try std.testing.expectEqualStrings("source", files.entries[0].lines[0]); │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ──────╮ │src/test/ui.zig│ ╰───────────────╯ ╭─────────────────────────────────────────────────────────────────────╮ │195 const base_oid = "3333333333333333333333333333333333333333";│ │196 │ │197 const data = Commits{ │ │198 - .location = .{ .repo = identity }, │ │198 + .handle = .{ .location = .{ .repo = identity } }, │ │199 .ref_or_oid = .object, │ │200 .ref_or_oid_value = oid0, │ │201 .base_oid = base_oid, │ ╰─────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────╮ │271 defer repo.deinit(io, allocator); │ │272 var arena = std.heap.ArenaAllocator.init(allocator); │ │273 defer arena.deinit(); │ │274 - const location = ui.RoutablePage.RepoLocation{ .repo = "" }; │ │274 + const handle = ui.RepoHandle{ .location = .{ .repo = "" } }; │ │275 const content = ui.RoutablePage.RepoCommitsRoute.Content{ .diff = .{} };│ │276 const branch = xit.ref.Ref{ .kind = .head, .name = "master" }; │ │277 │ ╰─────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │283 previous = tip; │ │284 tip = try repo.commitAtRef(io, allocator, .{ .message = "next" }, null, branch); │ │285 } │ │286 - const first = try Commits.init(kind, opts, &arena, &repo, io, allocator, null, location, .object, &tip, content, &base, "", ""); │ │286 + const first = try Commits.init(kind, opts, &arena, &repo, io, allocator, null, handle, .object, &tip, content, &base, "", ""); │ │287 try std.testing.expectEqual(20, first.commits.len); │ │288 - const last = try Commits.init(kind, opts, &arena, &repo, io, allocator, null, location, .object, first.next_start orelse return error.MissingNext, content, &base, "", "");│ │288 + const last = try Commits.init(kind, opts, &arena, &repo, io, allocator, null, handle, .object, first.next_start orelse return error.MissingNext, content, &base, "", ""); │ │289 try std.testing.expectEqual(1, last.commits.len); │ │290 try std.testing.expectEqual(null, last.next_start); │ │291 │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │292 // the base at a page boundary must not create an empty next page │ │293 - const full = try Commits.init(kind, opts, &arena, &repo, io, allocator, null, location, .object, &previous, content, &base, "", "");│ │293 + const full = try Commits.init(kind, opts, &arena, &repo, io, allocator, null, handle, .object, &previous, content, &base, "", ""); │ │294 try std.testing.expectEqual(20, full.commits.len); │ │295 try std.testing.expectEqual(null, full.next_start); │ │296 const tag_oid = try repo.addTag(io, allocator, .{ .name = "tip", .message = "annotated" }); │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │301 .{ .ref = .tag, .value = "tip" }, │ │302 }; │ │303 for (sources) |source| { │ │304 - const empty = try Commits.init(kind, opts, &arena, &repo, io, allocator, null, location, source.ref, source.value, content, &tip, "", ""); │ │304 + const empty = try Commits.init(kind, opts, &arena, &repo, io, allocator, null, handle, source.ref, source.value, content, &tip, "", ""); │ │305 try std.testing.expectEqual(0, empty.commits.len); │ │306 - const paged = try Commits.init(kind, opts, &arena, &repo, io, allocator, null, location, source.ref, source.value, content, &base, "", first.next_start orelse return error.MissingNext);│ │306 + const paged = try Commits.init(kind, opts, &arena, &repo, io, allocator, null, handle, source.ref, source.value, content, &base, "", first.next_start orelse return error.MissingNext); │ │307 try std.testing.expectEqual(1, paged.commits.len); │ │308 try std.testing.expectEqualStrings(last.commits[0].oid, paged.commits[0].oid); │ │309 try std.testing.expectEqual(source.ref, paged.ref_or_oid); │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │312 │ │313 // an off-chain stopping point must not hide its parent on this chain │ │314 const other = try repo.commitAtRef(io, allocator, .{ .message = "other", .parent_oids = &.{base} }, null, .{ .kind = .head, .name = "other" }); │ │315 - const off_chain = try Commits.init(kind, opts, &arena, &repo, io, allocator, null, location, .object, last.commits[0].oid, content, &other, "", "");│ │315 + const off_chain = try Commits.init(kind, opts, &arena, &repo, io, allocator, null, handle, .object, last.commits[0].oid, content, &other, "", ""); │ │316 try std.testing.expectEqual(2, off_chain.commits.len); │ │317 try std.testing.expectEqualStrings(&base, off_chain.commits[1].oid); │ │318 } │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ────────╮ │src/test/undo.zig│ ╰─────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │17 defer repo.deinit(io, allocator); │ │18 var arena = std.heap.ArenaAllocator.init(allocator); │ │19 defer arena.deinit(); │ │20 - const initial = try Undo.init(opts, &arena, &repo, null, "", null); │ │20 + const initial = try Undo.init(opts, &arena, &repo, null, "", null, .{ .location = .{ .repo = "" } });│ │21 try std.testing.expectEqual(1, initial.count); │ │22 for (0..25) |index| { │ │23 const value = try std.fmt.allocPrint(arena.allocator(), "{d}", .{index}); │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │24 try repo.addConfig(io, allocator, .{ .name = "undo.value", .value = value }); │ │25 } │ │26 - const first = try Undo.init(opts, &arena, &repo, null, "", null); │ │26 + const first = try Undo.init(opts, &arena, &repo, null, "", null, .{ .location = .{ .repo = "" } }); │ │27 try std.testing.expectEqual(20, first.items.len); │ │28 try std.testing.expectEqual(25, first.items[0].index); │ │29 - const second = try Undo.init(opts, &arena, &repo, null, "", first.next); │ │29 + const second = try Undo.init(opts, &arena, &repo, null, "", first.next, .{ .location = .{ .repo = "" } });│ │30 try std.testing.expectEqual(6, second.items.len); │ │31 try std.testing.expectEqual(5, second.items[0].index); │ │32 try std.testing.expectEqual(0, second.items[5].index); │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │33 try std.testing.expectEqual(null, second.next); │ │34 - try std.testing.expectError(error.NotFound, Undo.init(opts, &arena, &repo, null, "", 26)); │ │34 + try std.testing.expectError(error.NotFound, Undo.init(opts, &arena, &repo, null, "", 26, .{ .location = .{ .repo = "" } }));│ │35 try std.testing.expectError(error.InvalidHistoryIndex, repo.undo(io, 0)); │ │36 try std.testing.expectError(error.InvalidHistoryIndex, repo.undo(io, 26)); │ │37 │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯