╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ────╮ │src/serve.zig│ ╰─────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │41 fn run(ctx: @This()) !void { │ │38 - try runHttpListener(repo_kind, any_repo_opts, ctx.io, ctx.allocator, ctx.project_root, ctx.http_listen, ctx.err);│ │42 + try runHttpListener(repo_kind, any_repo_opts, ctx.io, ctx.allocator, ctx.repo_root, ctx.http_listen, ctx.err); │ │43 } │ │44 }; │ │45 │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────╮ │46 const http_thread = try std.Thread.spawn(.{}, HttpContext.run, .{HttpContext{│ │47 .io = io, │ │48 .allocator = allocator, │ │45 - .project_root = project_root, │ │49 + .repo_root = repo_root, │ │50 .http_listen = options.http_listen, │ │51 .err = err, │ │52 }}); │ ╰─────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │53 defer http_thread.join(); │ │54 │ │51 - try runSshListener(repo_kind, any_repo_opts, io, allocator, project_root, ssh_listen, err); │ │55 + try runSshListener(repo_kind, any_repo_opts, io, allocator, repo_root, ssh_listen, err); │ │56 } else { │ │53 - try runHttpListener(repo_kind, any_repo_opts, io, allocator, project_root, options.http_listen, err);│ │57 + try runHttpListener(repo_kind, any_repo_opts, io, allocator, repo_root, options.http_listen, err); │ │58 } │ │59 } │ │60 │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────╮ │63 comptime any_repo_opts: rp.AnyRepoOpts(repo_kind),│ │64 io: std.Io, │ │65 allocator: std.mem.Allocator, │ │62 - project_root: []const u8, │ │66 + repo_root: []const u8, │ │67 http_listen: []const u8, │ │68 err: *std.Io.Writer, │ │69 ) !void { │ ╰──────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────╮ │72 var net_server = try address.listen(io, .{ .reuse_address = true }); │ │73 defer net_server.deinit(io); │ │74 │ │71 - try err.print("serving HTTP on {s}, project root {s}\n", .{ http_listen, project_root });│ │75 + try err.print("serving HTTP on {s}, repo root {s}\n", .{ http_listen, repo_root }); │ │76 try err.flush(); │ │77 │ │78 var send_buffer = [_]u8{0} ** any_repo_opts.net_buffer_size; │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │ 96 else => |e| return e, │ │ 97 }; │ │ 98 │ │ 95 - handleRequest(repo_kind, any_repo_opts, io, allocator, project_root, &http_server, &request) catch |request_err| {│ │ 99 + handleRequest(repo_kind, any_repo_opts, io, allocator, repo_root, &http_server, &request) catch |request_err| { │ │100 try err.print("request failed: {s}\n", .{@errorName(request_err)}); │ │101 try err.flush(); │ │102 if (http_server.reader.state == .received_head) { │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────╮ │115 comptime any_repo_opts: rp.AnyRepoOpts(repo_kind),│ │116 io: std.Io, │ │117 allocator: std.mem.Allocator, │ │114 - project_root: []const u8, │ │118 + repo_root: []const u8, │ │119 http_server: *std.http.Server, │ │120 request: *std.http.Server.Request, │ │121 ) !void { │ ╰───────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────╮ │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) { │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯