╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ───────╮ │src/test/net.zig│ ╰────────────────╯ ╭───────────────────────────────────────╮ │1614 fn repoOnDiskPath( │ │1615 io: std.Io, │ │1616 allocator: std.mem.Allocator,│ │1698 - data_dir_name: []const u8, │ │1617 + data_path: []const u8, │ │1618 repo_name: []const u8, │ │1619 create: bool, │ │1620 ) !?[]u8 { │ ╰───────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1702 - const cwd_path = try std.process.currentPathAlloc(io, allocator); │ │1703 - defer allocator.free(cwd_path); │ │1704 - │ │1705 - const admin_repo_path = try std.fs.path.join(allocator, &.{ cwd_path, data_dir_name, "admin" });│ │1621 + const admin_repo_path = try std.fs.path.join(allocator, &.{ data_path, "admin" }); │ │1622 defer allocator.free(admin_repo_path); │ │1623 │ │1624 const event_id_hex = (try evt.resolveOrCreateRepo( │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1629 repo_name, │ │1630 if (create) .{ .read_access = .public } else null, │ │1631 )) orelse return null; │ │1716 - return try std.fs.path.join(allocator, &.{ cwd_path, data_dir_name, "repos", &event_id_hex });│ │1632 + return try std.fs.path.join(allocator, &.{ data_path, "repos", &event_id_hex }); │ │1633 } │ │1634 │ │1635 // build the remote URL addressing admin/<repo_name> over the given transport │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────╮ │1655 fn sshCommand( │ │1656 is_ssh: bool, │ │1657 allocator: std.mem.Allocator,│ │1742 - cwd_path: []const u8, │ │1743 - temp_dir_name: []const u8, │ │1658 + temp_path: []const u8, │ │1659 port: u16, │ │1660 ) !?[]u8 { │ │1661 if (!is_ssh) return null; │ ╰───────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1662 │ │1748 - const priv_key_path = try std.fs.path.join(allocator, &.{ cwd_path, temp_dir_name, "key" }); │ │1663 + const priv_key_path = try std.fs.path.join(allocator, &.{ temp_path, "key" }); │ │1664 defer allocator.free(priv_key_path); │ │1665 │ │1666 return try std.fmt.allocPrint(allocator, "ssh -p {} -o BatchMode=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=ERROR -o IdentitiesOnly=yes -o IdentityFile=\"{s}\"", .{ port + 1, priv_key_path });│ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ──────╮ │src/test/ui.zig│ ╰───────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────╮ │74 test "sync creates missing event branches and preserves head" { │ │75 const io = std.testing.io; │ │76 const allocator = std.testing.allocator; │ │77 - const cwd = std.Io.Dir.cwd(); │ │78 - const temp_dir_name = "temp-ui-sync"; │ │77 │ │80 - cwd.deleteTree(io, temp_dir_name) catch {}; │ │81 - var temp_dir = try cwd.createDirPathOpen(io, temp_dir_name, .{}); │ │82 - defer cwd.deleteTree(io, temp_dir_name) catch {}; │ │83 - defer temp_dir.close(io); │ │78 + var temp = std.testing.tmpDir(.{}); │ │79 + defer temp.cleanup(); │ │80 + const temp_path = try temp.dir.realPathFileAlloc(io, ".", allocator); │ │81 + defer allocator.free(temp_path); │ │82 │ │85 - const cwd_path = try std.process.currentPathAlloc(io, allocator); │ │86 - defer allocator.free(cwd_path); │ │87 - const local_path = try std.fs.path.join(allocator, &.{ cwd_path, temp_dir_name, "local" }); │ │83 + const local_path = try std.fs.path.join(allocator, &.{ temp_path, "local" }); │ │84 defer allocator.free(local_path); │ │89 - const remote_path = try std.fs.path.join(allocator, &.{ cwd_path, temp_dir_name, "remote" });│ │85 + const remote_path = try std.fs.path.join(allocator, &.{ temp_path, "remote" }); │ │86 defer allocator.free(remote_path); │ │87 │ │88 const Repo = xit.repo.Repo(.git, .{}); │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────╯