╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ────╮ │src/patch.zig│ ╰─────────────╯ ╭────────────────────────────────────────────────────────────────────────╮ │1415 moment: *evt.EventDB(repo_opts.hash).HashMap(.read_write), │ │1416 io: std.Io, │ │1417 allocator: std.mem.Allocator, │ │1337 - repo_root_path: []const u8, │ │1418 + users_dir: []const u8, │ │1419 updates: []const xit.net_server_receive_pack.AppliedRefUpdate,│ │1420 error_writer: *std.Io.Writer, │ │1421 ) !void { │ ╰────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1491 │ │1492 // a fast-forward has no recorded merge boundary; use the old ref tip │ │1493 const before_oid = if (std.mem.eql(u8, &commit.oid, &target.after_oid)) &old_oid else &target.before_oid; │ │1413 - importMerged(repo_opts, state, db, moment, io, allocator, repo_root_path, &patch_id, &commit.oid, before_oid, &target.after_oid) catch |err| {│ │1494 + importMerged(repo_opts, state, db, moment, io, allocator, users_dir, &patch_id, &commit.oid, before_oid, &target.after_oid) catch |err| { │ │1495 serve_common.logError(io, error_writer, "failed to mark patch {s} as merged: {s}\n", .{ &patch_hex, @errorName(err) }); │ │1496 continue; │ │1497 }; │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ───╮ │src/push.zig│ ╰────────────╯ ╭──────────────────────────────────────────────────────╮ │119 writer: *std.Io.Writer, │ │120 options: xit.net_server_receive_pack.Options,│ │121 author: ?evt.CommitAuthor, │ │122 - repo_root_path: []const u8, │ │122 + users_dir: []const u8, │ │123 error_writer: *std.Io.Writer, │ │124 sess: ?*ssh.SessionCtx, │ │125 ) !void { │ ╰──────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────╮ │143 options: xit.net_server_receive_pack.Options, │ │144 author: ?evt.CommitAuthor, │ │145 response: *xit.net_server_receive_pack.Response,│ │146 - repo_root_path: []const u8, │ │146 + users_dir: []const u8, │ │147 error_writer: *std.Io.Writer, │ │148 sideband: *progress.Sideband, │ │149 │ ╰─────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │163 // transaction and must commit regardless. │ │164 if (null != try rf.readRecur(.xit, repo_opts, state.readOnly(), ctx.io, .{ .ref = evt.events_ref })) { │ │165 _ = try evt.consumeInTransaction(.repo, .xit, repo_opts, state, &ctx.core.db, &moment, ctx.io, ctx.allocator, evt.events_ref); │ │166 - try pch.detectMerged(repo_opts, state, &ctx.core.db, &moment, ctx.io, ctx.allocator, ctx.repo_root_path, ctx.updates.items.items, ctx.error_writer);│ │166 + try pch.detectMerged(repo_opts, state, &ctx.core.db, &moment, ctx.io, ctx.allocator, ctx.users_dir, ctx.updates.items.items, ctx.error_writer); │ │167 │ │168 // the revisions the pushed branches cause belong to the push │ │169 _ = try pch.refreshBranchesInTransaction(.server, repo_opts, state, &moment, ctx.io, ctx.allocator, ctx.updates.items.items, null, ctx.sideband); │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────╮ │199 .options = options, │ │200 .author = author, │ │201 .response = &response, │ │202 - .repo_root_path = repo_root_path,│ │202 + .users_dir = users_dir, │ │203 .error_writer = error_writer, │ │204 .sideband = &sideband, │ │205 }, │ ╰──────────────────────────────────────────────────────╯ ╭ changed ────╮ │src/serve.zig│ ╰─────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────╮ │61 const data_dir = try std.Io.Dir.cwd().createDirPathOpen(io, data_dir_path, .{}); │ │62 defer data_dir.close(io); │ │63 │ │64 - // create the repos dir │ │64 + // create the users dir │ │65 │ │66 - const repo_root_path = try std.fs.path.resolve(allocator, &.{ data_dir_path, "repos" });│ │67 - defer allocator.free(repo_root_path); │ │66 + const users_dir = try std.fs.path.resolve(allocator, &.{ data_dir_path, "users" }); │ │67 + defer allocator.free(users_dir); │ │68 │ │69 - try std.Io.Dir.cwd().createDirPath(io, repo_root_path); │ │69 + try std.Io.Dir.cwd().createDirPath(io, users_dir); │ │70 │ │71 // the admin repo path is where the user/repo metadata events live │ │72 │ ╰────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │114 .host_key = try serve_ssh_protocol.HostKey.loadOrGenerate(io, allocator, data_dir_path),│ │115 .session_handler = .{ │ │116 .admin_repo_path = admin_repo_path, │ │117 - .repo_root_path = repo_root_path, │ │117 + .users_dir = users_dir, │ │118 .wui_port = wui_server.socket.address.getPort(), │ │119 .git_http_port = git_http_port, │ │120 .git_ssh_port = ssh_port, │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │135 const git_ssh_port: ?u16 = if (ssh_maybe) |*ssh| ssh.listener.port() else null; │ │136 │ │137 if (http_maybe) |*http| { │ │138 - try err.print("serving HTTP on {s}:{d}, repo root {s}\n", .{ http.address.host, http.port(), repo_root_path }); │ │138 + try err.print("serving HTTP on {s}:{d}, users dir {s}\n", .{ http.address.host, http.port(), users_dir }); │ │139 try err.flush(); │ │140 - serve_http.runListener(repo_kind, any_repo_opts, io, allocator, repo_root_path, admin_repo_path, &http.server, &tasks, err);│ │140 + serve_http.runListener(repo_kind, any_repo_opts, io, allocator, users_dir, admin_repo_path, &http.server, &tasks, err); │ │141 } │ │142 │ │143 if (ssh_maybe) |*ssh| { │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────╮ │151 │ │152 runWebListener(io, allocator, &wui_server, &tasks, .{ .server = .{│ │153 .admin_repo_path = admin_repo_path, │ │154 - .repo_root_path = repo_root_path, │ │154 + .users_dir = users_dir, │ │155 .session_store = session_store, │ │156 .git_http_port = git_http_port, │ │157 .git_ssh_port = git_ssh_port, │ ╰───────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯