╭ changed ───────╮ │src/test/net.zig│ ╰────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────╮ │← previous│ ╰──────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1352 try server_repo.addConfig(io, allocator, .{ .name = "uploadpack.allowrefinwant", .value = "true" }); │ │1353 } │ │1354 │ │1355 - const client_path = try std.fs.path.join(allocator, &.{ temp_path, "client" }); │ │1355 + const client_path = try std.Io.Dir.path.join(allocator, &.{ temp_path, "client" }); │ │1356 defer allocator.free(client_path); │ │1357 │ │1358 var client_repo = try rp.Repo(repo_kind, .{ .hash = hash_kind, .is_test = true }).init(io, allocator, .{ .path = client_path });│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1375 if (shell_out_to_git) { │ │1376 const ssh_cmd = (try sshCommand(true, allocator, temp_path, port)).?; │ │1377 defer allocator.free(ssh_cmd); │ │1378 - const ssh_config_arg = try std.fmt.allocPrint(allocator, "core.sshCommand={s}", .{ssh_cmd});│ │1378 + const ssh_config_arg = try allocator.print("core.sshCommand={s}", .{ssh_cmd}); │ │1379 defer allocator.free(ssh_config_arg); │ │1380 │ │1381 { │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1488 defer export_file.close(io); │ │1489 } │ │1490 │ │1491 - const client_path = try std.fs.path.join(allocator, &.{ temp_path, "client" }); │ │1491 + const client_path = try std.Io.Dir.path.join(allocator, &.{ temp_path, "client" }); │ │1492 defer allocator.free(client_path); │ │1493 │ │1494 var client_repo = try rp.Repo(repo_kind, .{ .hash = hash_kind, .is_test = true }).init(io, allocator, .{ .path = client_path });│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1562 if (shell_out_to_git) { │ │1563 const ssh_cmd = (try sshCommand(true, allocator, temp_path, port)).?; │ │1564 defer allocator.free(ssh_cmd); │ │1565 - const ssh_config_arg = try std.fmt.allocPrint(allocator, "core.sshCommand={s}", .{ssh_cmd});│ │1565 + const ssh_config_arg = try allocator.print("core.sshCommand={s}", .{ssh_cmd}); │ │1566 defer allocator.free(ssh_config_arg); │ │1567 │ │1568 // shell out to git so it will send delta objects │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1628 // create the admin event repo with a user holding the dev SSH public key, plus │ │1629 // that user's repo │ │1630 fn setupAdmin(io: std.Io, allocator: std.mem.Allocator, data_path: []const u8) !void { │ │1631 - const admin_repo_path = try std.fs.path.join(allocator, &.{ data_path, "admin" }); │ │1631 + const admin_repo_path = try std.Io.Dir.path.join(allocator, &.{ data_path, "admin" }); │ │1632 defer allocator.free(admin_repo_path); │ │1633 │ │1634 var repo = try rp.Repo(.xit, evt.admin_repo_opts).init(io, allocator, .{ .bare = true, .path = admin_repo_path });│ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1643 var password_hash_buf: [evt.User.password_hash_max_len]u8 = undefined; │ │1644 const password_hash = try evt.User.hashPassword("password", &password_hash_buf, io); │ │1645 │ │1646 - const users_dir = try std.fs.path.join(allocator, &.{ data_path, "users" }); │ │1646 + const users_dir = try std.Io.Dir.path.join(allocator, &.{ data_path, "users" }); │ │1647 defer allocator.free(users_dir); │ │1648 try evt.consume(.{ .server = .{ .users_dir = users_dir } }, .admin, .xit, evt.admin_repo_opts, io, allocator, &repo, evt.events_ref, &[_]evt.EventWithId{.{│ │1649 .id = std.fmt.bytesToHex(user_id, .lower), │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────╮ │1671 repo_name: []const u8, │ │1672 create: bool, │ │1673 ) !?[]u8 { │ │1674 - const admin_repo_path = try std.fs.path.join(allocator, &.{ data_path, "admin" }); │ │1674 + const admin_repo_path = try std.Io.Dir.path.join(allocator, &.{ data_path, "admin" });│ │1675 defer allocator.free(admin_repo_path); │ │1676 - const users_dir = try std.fs.path.join(allocator, &.{ data_path, "users" }); │ │1676 + const users_dir = try std.Io.Dir.path.join(allocator, &.{ data_path, "users" }); │ │1677 defer allocator.free(users_dir); │ │1678 │ │1679 const location = (try evt.resolveOrCreateRepo( │ ╰────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1698 return switch (transport_def) { │ │1699 .file => unreachable, │ │1700 .wire => |wire_kind| switch (wire_kind) { │ │1701 - .http => try std.fmt.allocPrint(allocator, "http://localhost:{}/admin:{s}", .{ port, repo_name }),│ │1702 - .raw => try std.fmt.allocPrint(allocator, "git://localhost:{}/admin:{s}", .{ port, repo_name }), │ │1703 - .ssh => try std.fmt.allocPrint(allocator, "git@localhost:admin:{s}", .{repo_name}), │ │1701 + .http => try allocator.print("http://localhost:{}/admin:{s}", .{ port, repo_name }), │ │1702 + .raw => try allocator.print("git://localhost:{}/admin:{s}", .{ port, repo_name }), │ │1703 + .ssh => try allocator.print("git@localhost:admin:{s}", .{repo_name}), │ │1704 }, │ │1705 }; │ │1706 } │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1716 ) !?[]u8 { │ │1717 if (!is_ssh) return null; │ │1718 │ │1719 - const priv_key_path = try std.fs.path.join(allocator, &.{ temp_path, "key" }); │ │1719 + const priv_key_path = try std.Io.Dir.path.join(allocator, &.{ temp_path, "key" }); │ │1720 defer allocator.free(priv_key_path); │ │1721 │ │1722 - if (builtin.os.tag == .windows) std.mem.replaceScalar(u8, priv_key_path, '\\', '/'); │ │1723 - const null_path = if (builtin.os.tag == .windows) "NUL" else "/dev/null"; │ │1724 - return try std.fmt.allocPrint(allocator, "ssh -p {} -o BatchMode=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile={s} -o LogLevel=ERROR -o IdentitiesOnly=yes -i \"{s}\"", .{ port + 1, null_path, priv_key_path });│ │1722 + if (builtin.target.os.tag == .windows) std.mem.replaceScalar(u8, priv_key_path, '\\', '/'); │ │1723 + const null_path = if (builtin.target.os.tag == .windows) "NUL" else "/dev/null"; │ │1724 + return try allocator.print("ssh -p {} -o BatchMode=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile={s} -o LogLevel=ERROR -o IdentitiesOnly=yes -i \"{s}\"", .{ port + 1, null_path, priv_key_path }); │ │1725 } │ │1726 │ │1727 const ServerFiles = union(enum) { │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1757 defer dir.close(ctx.io); │ │1758 var entries = dir.iterate(); │ │1759 while (try entries.next(ctx.io)) |entry| { │ │1760 - const child = try std.fs.path.join(ctx.allocator, &.{ path, entry.name }); │ │1760 + const child = try std.Io.Dir.path.join(ctx.allocator, &.{ path, entry.name });│ │1761 defer ctx.allocator.free(child); │ │1762 switch (entry.kind) { │ │1763 .directory => try ctx.addDir(state, index, child), │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────╯