╭ changed ────╮ │src/serve.zig│ ╰─────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────╮ │← previous│ ╰──────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────╮ │138 const repo_rel = try decodeAndValidateRepoPath(allocator, repo_rel_encoded); │ │139 defer allocator.free(repo_rel); │ │140 │ │137 - const repo_path = try std.fs.path.resolve(allocator, &.{ project_root, repo_rel });│ │141 + const repo_path = try std.fs.path.resolve(allocator, &.{ repo_root, repo_rel }); │ │142 defer allocator.free(repo_path); │ │143 │ │140 - if (!isSubPath(project_root, repo_path)) { │ │144 + if (!isSubPath(repo_root, repo_path)) { │ │145 if (http_server.reader.state == .received_head) { │ │146 http_server.reader.state = .ready; │ │147 } │ ╰────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────╮ │233 comptime any_repo_opts: rp.AnyRepoOpts(repo_kind),│ │234 io: std.Io, │ │235 allocator: std.mem.Allocator, │ │232 - project_root: []const u8, │ │236 + repo_root: []const u8, │ │237 ssh_listen: []const u8, │ │238 err: *std.Io.Writer, │ │239 ) !void { │ ╰───────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │242 var net_server = try address.listen(io, .{ .reuse_address = true }); │ │243 defer net_server.deinit(io); │ │244 │ │241 - try err.print("serving SSH helper connections on {s}, project root {s}\n", .{ ssh_listen, project_root });│ │245 + try err.print("serving SSH helper connections on {s}, repo root {s}\n", .{ ssh_listen, repo_root }); │ │246 try err.flush(); │ │247 │ │248 while (true) { │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │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 { │ ╰─────────────────────────────────────────────────────────────────────────────╯