╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ───────╮ │src/test/net.zig│ ╰────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────╮ │88 comptime port: u16, │ │89 ) !std.process.Child { │ │90 { │ │91 - const priv_key_path = try std.fs.path.join(allocator, &.{ temp_path, "key" }); │ │91 + const priv_key_path = try std.Io.Dir.path.join(allocator, &.{ temp_path, "key" });│ │92 defer allocator.free(priv_key_path); │ │93 const priv_key_file = try std.Io.Dir.cwd().createFile(io, priv_key_path, .{}); │ │94 defer priv_key_file.close(io); │ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────╮ │102 \\-----END OPENSSH PRIVATE KEY----- │ │103 \\ │ │104 ); │ │105 - if (.windows != builtin.os.tag) { │ │106 - try priv_key_file.setPermissions(io, @enumFromInt(0o600)); │ │105 + if (.windows != builtin.target.os.tag) { │ │106 + try priv_key_file.setPermissions(io, @fromBackingInt(@intCast(0o600)));│ │107 } │ │108 } │ │109 │ ╰────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────╮ │110 - if (builtin.os.tag == .windows) { │ │110 + if (builtin.target.os.tag == .windows) { │ │111 // openssh needs an acl granting access only to the current user.│ │112 // use cwd so the temp path doesn't need powershell quoting. │ │113 var permissions_process = try std.process.spawn(io, .{ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────╮ │139 │ │140 const cwd_path = try std.process.currentPathAlloc(io, allocator); │ │141 defer allocator.free(cwd_path); │ │142 - const haxy_path = try std.fs.path.join(allocator, &.{ cwd_path, "zig-out/bin/haxy" }); │ │142 + const haxy_path = try std.Io.Dir.path.join(allocator, &.{ cwd_path, "zig-out/bin/haxy" });│ │143 defer allocator.free(haxy_path); │ │144 │ │145 const http_listen_arg = std.fmt.comptimePrint("127.0.0.1:{}", .{port}); │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │204 // add a tag │ │205 _ = try server_repo.addTag(io, allocator, .{ .name = "1.0.0", .message = "hi" }); │ │206 │ │207 - const client_path = try std.fs.path.join(allocator, &.{ temp_path, "client" }); │ │207 + const client_path = try std.Io.Dir.path.join(allocator, &.{ temp_path, "client" }); │ │208 defer allocator.free(client_path); │ │209 │ │210 var client_repo = try rp.Repo(repo_kind, .{ .hash = hash_kind, .is_test = true }).init(io, allocator, .{ .path = client_path });│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────╮ │220 } │ │221 │ │222 // create refspec with oid as a test │ │223 - const oid_refspec = try std.fmt.allocPrint(allocator, "+{s}:refs/heads/foo", .{&commit1});│ │223 + const oid_refspec = try allocator.print("+{s}:refs/heads/foo", .{&commit1}); │ │224 defer allocator.free(oid_refspec); │ │225 │ │226 const refspecs = &.{ │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │318 defer export_file.close(io); │ │319 } │ │320 │ │321 - const client_path = try std.fs.path.join(allocator, &.{ temp_path, "client" }); │ │321 + const client_path = try std.Io.Dir.path.join(allocator, &.{ temp_path, "client" }); │ │322 defer allocator.free(client_path); │ │323 │ │324 var client_repo = try rp.Repo(repo_kind, .{ .hash = hash_kind, .is_test = true }).init(io, allocator, .{ .path = client_path });│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────╮ │527 const other_path = (try repoOnDiskPath(io, allocator, temp_path, "other", true)).?;│ │528 defer allocator.free(other_path); │ │529 │ │530 - const admin_path = try std.fs.path.join(allocator, &.{ temp_path, "admin" }); │ │530 + const admin_path = try std.Io.Dir.path.join(allocator, &.{ temp_path, "admin" }); │ │531 defer allocator.free(admin_path); │ │532 - const users_dir = try std.fs.path.join(allocator, &.{ temp_path, "users" }); │ │532 + const users_dir = try std.Io.Dir.path.join(allocator, &.{ temp_path, "users" }); │ │533 defer allocator.free(users_dir); │ │534 │ │535 var prng = std.Random.DefaultPrng.init(std.testing.random_seed); │ ╰────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────╮ │563 }; │ │564 defer allocator.free(draft_path); │ │565 │ │566 - const client_path = try std.fs.path.join(allocator, &.{ temp_path, "client" }); │ │566 + const client_path = try std.Io.Dir.path.join(allocator, &.{ temp_path, "client" });│ │567 defer allocator.free(client_path); │ │568 const ssh_cmd = (try sshCommand(true, allocator, temp_path, port)).?; │ │569 defer allocator.free(ssh_cmd); │ ╰────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │586 break :blk try client.commit(io, allocator, .{ .message = "add feature" }); │ │587 }; │ │588 │ │589 - const remote_url = try std.fmt.allocPrint(allocator, "git@localhost:admin:target+{s}", .{&fork_id_hex}); │ │589 + const remote_url = try allocator.print("git@localhost:admin:target+{s}", .{&fork_id_hex}); │ │590 defer allocator.free(remote_url); │ │591 try client.addRemote(io, allocator, .{ .name = "patch", .value = remote_url }); │ │592 try client.push(io, allocator, "patch", "master:patch", false, .{ .wire = .{ .ssh = .{ .command = ssh_cmd } } });│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯