╭ changed ──────╮ │src/test/ui.zig│ ╰───────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │285 } │ │286 const first = try Commits.init(kind, opts, &arena, &repo, io, allocator, null, location, .object, &tip, content, &base, "", ""); │ │287 try std.testing.expectEqual(20, first.commits.len); │ │288 - try std.testing.expectEqual(@as(?u64, if (kind == .xit) 21 else null), first.commit_count); │ │288 const last = try Commits.init(kind, opts, &arena, &repo, io, allocator, null, location, .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); │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │293 const full = try Commits.init(kind, opts, &arena, &repo, io, allocator, null, location, .object, &previous, content, &base, "", "");│ │294 try std.testing.expectEqual(20, full.commits.len); │ │295 try std.testing.expectEqual(null, full.next_start); │ │297 - _ = try repo.addTag(io, allocator, .{ .name = "tip", .message = "annotated" }); │ │296 + const tag_oid = try repo.addTag(io, allocator, .{ .name = "tip", .message = "annotated" }); │ │297 const sources = [_]struct { ref: ui.RoutablePage.RefOrOid, value: []const u8 }{ │ │298 .{ .ref = .object, .value = &tip }, │ │299 + .{ .ref = .object, .value = &tag_oid }, │ │300 .{ .ref = .branch, .value = branch.name }, │ │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, "", ""); │ │305 try std.testing.expectEqual(0, empty.commits.len); │ │306 - try std.testing.expectEqual(@as(?u64, if (kind == .xit) 0 else null), empty.commit_count); │ │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);│ │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); │ │310 + try std.testing.expectEqualStrings(source.value, paged.ref_or_oid_value); │ │311 } │ │312 │ │313 // an off-chain stopping point must not hide its parent on this chain │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │315 const off_chain = try Commits.init(kind, opts, &arena, &repo, io, allocator, null, location, .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); │ │314 - try std.testing.expectEqual(null, off_chain.commit_count); │ │318 } │ │319 │ │320 test "sync creates missing event branches and preserves head" { │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯