╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ───────╮ │src/test/net.zig│ ╰────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │179 const server_path = (try repoOnDiskPath(io, allocator, temp_path, "testrepo", true)).?; │ │180 defer allocator.free(server_path); │ │181 │ │168 - var server_repo = try rp.Repo(.xit, .{ .is_test = true }).init(io, allocator, .{ .bare = true, .path = server_path }); │ │182 + var server_repo = try rp.Repo(.xit, .{ .hash = hash_kind, .is_test = true }).init(io, allocator, .{ .bare = true, .path = server_path });│ │183 defer server_repo.deinit(io, allocator); │ │184 │ │185 // make a commit │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │199 const client_path = try std.fs.path.join(allocator, &.{ temp_path, "client" }); │ │200 defer allocator.free(client_path); │ │201 │ │188 - var client_repo = try rp.Repo(repo_kind, .{ .is_test = true }).init(io, allocator, .{ .path = client_path }); │ │202 + var client_repo = try rp.Repo(repo_kind, .{ .hash = hash_kind, .is_test = true }).init(io, allocator, .{ .path = client_path });│ │203 defer client_repo.deinit(io, allocator); │ │204 │ │205 // add remote │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────╮ │279 fn testPush( │ │280 comptime repo_kind: rp.RepoKind, │ │281 comptime transport_def: net.TransportDefinition,│ │282 + comptime hash_kind: hash.HashKind, │ │283 comptime port: u16, │ │284 io: std.Io, │ │285 allocator: std.mem.Allocator, │ ╰─────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │298 const server_path = (try repoOnDiskPath(io, allocator, temp_path, "testrepo", true)).?; │ │299 defer allocator.free(server_path); │ │300 │ │286 - var server_repo = try rp.Repo(.xit, .{ .is_test = true }).init(io, allocator, .{ .bare = true, .path = server_path }); │ │301 + var server_repo = try rp.Repo(.xit, .{ .hash = hash_kind, .is_test = true }).init(io, allocator, .{ .bare = true, .path = server_path });│ │302 defer server_repo.deinit(io, allocator); │ │303 │ │304 // add config │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │313 const client_path = try std.fs.path.join(allocator, &.{ temp_path, "client" }); │ │314 defer allocator.free(client_path); │ │315 │ │301 - var client_repo = try rp.Repo(repo_kind, .{ .is_test = true }).init(io, allocator, .{ .path = client_path }); │ │316 + var client_repo = try rp.Repo(repo_kind, .{ .hash = hash_kind, .is_test = true }).init(io, allocator, .{ .path = client_path });│ │317 defer client_repo.deinit(io, allocator); │ │318 │ │319 // make a commit │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────╮ │493 } │ │494 │ │495 fn testPushFork( │ │496 + comptime hash_kind: hash.HashKind,│ │497 comptime port: u16, │ │498 io: std.Io, │ │499 allocator: std.mem.Allocator, │ ╰───────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────╮ │500 ) !void { │ │501 + const repo_opts: rp.RepoOpts(.xit) = .{ .hash = hash_kind }; │ │502 + │ │503 var temp = std.testing.tmpDir(.{}); │ │504 defer temp.cleanup(); │ │505 const temp_path = try temp.dir.realPathFileAlloc(io, ".", allocator);│ ╰──────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │511 const target_path = (try repoOnDiskPath(io, allocator, temp_path, "target", true)).?; │ │512 defer allocator.free(target_path); │ │513 { │ │496 - var target_repo = try rp.Repo(.xit, .{}).init(io, allocator, .{ .bare = true, .path = target_path }); │ │514 + var target_repo = try rp.Repo(.xit, repo_opts).init(io, allocator, .{ .bare = true, .path = target_path }); │ │515 defer target_repo.deinit(io, allocator); │ │516 _ = try commitServer(&target_repo, io, allocator, .{ .files = &.{.{ .path = "main.txt", .content = "base contents\n" }} }, .{ .author = "admin <admin@example.test>", .message = "initial code" });│ │517 } │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │538 const target = (try evt.Repo.readByOwnerAndName(evt.AdminDB, evt.admin_repo_opts.hash, moment, &arena, "admin", "target")) orelse return error.NotFound;│ │539 repo_id = target.event_id; │ │540 @memcpy(&user_id, target.repo.event.user_id); │ │523 - break :blk try fork.create(.{}, io, allocator, repos_dir, &admin, .{ │ │541 + break :blk try fork.create(repo_opts, io, allocator, repos_dir, &admin, .{ │ │542 .id = fork_id_hex, │ │543 .user_id = user_id, │ │544 .repo_id = repo_id, │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────╮ │556 defer allocator.free(client_path); │ │557 const ssh_cmd = (try sshCommand(true, allocator, temp_path, port)).?; │ │558 defer allocator.free(ssh_cmd); │ │541 - var client = try rp.Repo(.xit, .{ .is_test = true }).clone( │ │559 + var client = try rp.Repo(.xit, .{ .hash = hash_kind, .is_test = true }).clone(│ │560 io, │ │561 allocator, │ │562 "git@localhost:admin/target", │ ╰───────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯