╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ────╮ │src/serve.zig│ ╰─────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │252 }; │ │253 defer stream.close(io); │ │254 │ │251 - handleSshConnection(repo_kind, any_repo_opts, io, allocator, project_root, stream) catch |request_err| {│ │255 + handleSshConnection(repo_kind, any_repo_opts, io, allocator, repo_root, stream) catch |request_err| { │ │256 try err.print("ssh request failed: {s}\n", .{@errorName(request_err)}); │ │257 try err.flush(); │ │258 }; │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────╮ │264 comptime any_repo_opts: rp.AnyRepoOpts(repo_kind), │ │265 io: std.Io, │ │266 allocator: std.mem.Allocator, │ │263 - project_root: []const u8, │ │267 + repo_root: []const u8, │ │268 stream: std.Io.net.Stream, │ │269 ) !void { │ │270 var send_buffer = [_]u8{0} ** any_repo_opts.net_buffer_size;│ ╰─────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │275 const request = try readSshRequest(allocator, &reader.interface); │ │276 defer request.deinit(allocator); │ │277 │ │274 - const repo_path = try resolveSshRepoPath(allocator, project_root, request.repo); │ │278 + const repo_path = try resolveSshRepoPath(allocator, repo_root, request.repo); │ │279 defer allocator.free(repo_path); │ │280 │ │277 - if (!isSubPath(project_root, repo_path)) return error.Forbidden; │ │281 + if (!isSubPath(repo_root, repo_path)) return error.Forbidden; │ │282 │ │283 if (any_repo_opts.hash) |hash_kind| { │ │284 var repo = try openRepo(repo_kind, any_repo_opts.toRepoOptsWithHash(hash_kind), io, allocator, repo_path, request.service == .receive_pack);│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────╮ │407 │ │408 fn resolveSshRepoPath( │ │409 allocator: std.mem.Allocator, │ │406 - project_root: []const u8, │ │410 + repo_root: []const u8, │ │411 repo: []const u8, │ │412 ) ![]const u8 { │ │413 if (std.fs.path.isAbsolute(repo)) {│ ╰────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────╮ │414 return try std.fs.path.resolve(allocator, &.{repo}); │ │415 } │ │412 - return try std.fs.path.resolve(allocator, &.{ project_root, repo });│ │416 + return try std.fs.path.resolve(allocator, &.{ repo_root, repo }); │ │417 } │ │418 │ │419 fn parseListenAddress(value: []const u8) !ListenAddress { │ ╰─────────────────────────────────────────────────────────────────────────────╯ ╭ changed ───╮ │src/test.zig│ ╰────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │244 const listen_arg = std.fmt.comptimePrint("127.0.0.1:{}", .{port}); │ │245 │ │246 self.core.process = try std.process.spawn(self.core.io, .{ │ │247 - .argv = &.{ haxy_path, "serve", "--http-listen", listen_arg, "--project-root", temp_dir_name },│ │247 + .argv = &.{ haxy_path, "serve", "--http-listen", listen_arg, "--data-dir", temp_dir_name }, │ │248 .stdin = .ignore, │ │249 .stdout = .ignore, │ │250 .stderr = .ignore, │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │263 const http_listen_arg = std.fmt.comptimePrint("127.0.0.1:{}", .{port + 2000}); │ │264 │ │265 self.core.serve_process = try std.process.spawn(self.core.io, .{ │ │266 - .argv = &.{ haxy_path, "serve", "--http-listen", http_listen_arg, "--ssh-listen", ssh_listen_arg, "--project-root", temp_dir_name },│ │266 + .argv = &.{ haxy_path, "serve", "--http-listen", http_listen_arg, "--ssh-listen", ssh_listen_arg, "--data-dir", temp_dir_name }, │ │267 .stdin = .ignore, │ │268 .stdout = .ignore, │ │269 .stderr = .ignore, │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │384 const cwd_path = try std.process.currentPathAlloc(io, allocator); │ │385 defer allocator.free(cwd_path); │ │386 │ │387 - const server_path = try std.fs.path.join(allocator, &.{ cwd_path, temp_dir_name, "server" }); │ │387 + const server_path = try std.fs.path.join(allocator, &.{ cwd_path, temp_dir_name, "repos", "server" }); │ │388 defer allocator.free(server_path); │ │389 │ │390 var server_repo = try rp.Repo(.xit, .{ .is_test = true }).init(io, allocator, .{ .path = server_path });│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │550 const cwd_path = try std.process.currentPathAlloc(io, allocator); │ │551 defer allocator.free(cwd_path); │ │552 │ │553 - const server_path = try std.fs.path.join(allocator, &.{ cwd_path, temp_dir_name, "server" }); │ │553 + const server_path = try std.fs.path.join(allocator, &.{ cwd_path, temp_dir_name, "repos", "server" }); │ │554 defer allocator.free(server_path); │ │555 │ │556 var server_repo = try rp.Repo(.xit, .{ .is_test = true }).init(io, allocator, .{ .path = server_path });│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │829 const cwd_path = try std.process.currentPathAlloc(io, allocator); │ │830 defer allocator.free(cwd_path); │ │831 │ │832 - const server_path = try std.fs.path.join(allocator, &.{ cwd_path, temp_dir_name, "server" }); │ │832 + const server_path = try std.fs.path.join(allocator, &.{ cwd_path, temp_dir_name, "repos", "server" });│ │833 defer allocator.free(server_path); │ │834 │ │835 const client_path = try std.fs.path.join(allocator, &.{ cwd_path, temp_dir_name, "client" }); │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯