╭ changed ───╮ │src/fork.zig│ ╰────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────╮ │122 const Ctx = struct { │ │123 core: *rp.Repo(.xit, repo_opts).Core, │ │124 io: std.Io, │ │125 + allocator: std.mem.Allocator, │ │126 │ │127 pub fn run(ctx: @This(), cursor: *DB.Cursor(.read_write)) !void {│ │128 var moment = try DB.HashMap(.read_write).init(cursor.*); │ ╰──────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │153 try bch.add(.xit, repo_opts, state, ctx.io, .{ .name = ref.name, .target = .none }); │ │154 } │ │155 try rf.replaceHead(.xit, repo_opts, state, ctx.io, .{ .ref = ref }); │ │156 + │ │157 + var config = try xit.config.Config(.xit, repo_opts).init(state.readOnly(), ctx.io, ctx.allocator); │ │158 + defer config.deinit(); │ │159 + try config.add(state, ctx.io, .{ .name = "receive.denydeletes", .value = "true" }); │ │160 + │ │161 try xit.undo.write(repo_opts, state, std.Io.Timestamp.now(ctx.io, .real).toSeconds(), .{ .custom = .{ .action_kind = undo_action } });│ │162 } │ │163 }; │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────╮ │168 const history = try DB.ArrayList(.read_write).init(fork_repo.core.db.rootCursor());│ │169 try history.appendContext( │ │170 .{ .slot = try history.getSlot(-1) }, │ │165 - Ctx{ .core = &fork_repo.core, .io = io }, │ │171 + Ctx{ .core = &fork_repo.core, .io = io, .allocator = allocator }, │ │172 ); │ │173 } │ │174 │ ╰────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────╮ │169 - try fork_repo.addConfig(io, allocator, .{ .name = "core.bare", .value = "true" }); │ │170 - try fork_repo.addConfig(io, allocator, .{ .name = "receive.denydeletes", .value = "true" });│ │171 - │ │175 // the copied db carries the target's file index, so the patch branch's │ │176 // entry starts from one of those rather than walking the tree │ │177 find.refresh(repo_opts, io, allocator, &fork_repo) catch |err| { │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ────────╮ │src/serve_ssh.zig│ ╰─────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │401 if (!create_if_missing) return writeError(sess, "repo not found"); │ │402 │ │403 // create the on-disk repo for the just-minted event and serve the push │ │404 - var repo = try createRepo(any_repo_opts.toRepoOpts(), io, allocator, repo_path); │ │404 + var repo = try rp.Repo(.xit, any_repo_opts.toRepoOpts()).init(io, allocator, .{ .path = repo_path, .bare = true }); │ │405 defer repo.deinit(io, allocator); │ │406 try servePack(repo.self_repo_opts, &repo, handler.repo_root_path, &reader.interface, &writer.interface, io, allocator, parsed.service, protocol_version, author, handler.err, sess);│ │407 } │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │497 return true; │ │498 } │ │499 │ │500 -fn createRepo( │ │501 - comptime repo_opts: rp.RepoOpts(.xit), │ │502 - io: std.Io, │ │503 - allocator: std.mem.Allocator, │ │504 - repo_path: []const u8, │ │505 -) !rp.Repo(.xit, repo_opts) { │ │506 - var repo = try rp.Repo(.xit, repo_opts).init(io, allocator, .{ .path = repo_path, .bare = true });│ │507 - errdefer repo.deinit(io, allocator); │ │508 - try repo.setMergeAlgorithm(io, allocator, .patch); │ │509 - try repo.addConfig(io, allocator, .{ .name = "http.receivepack", .value = "true" }); │ │510 - return repo; │ │511 -} │ │512 - │ │500 fn servePack( │ │501 comptime repo_opts: rp.RepoOpts(.xit), │ │502 repo: *rp.Repo(.xit, repo_opts), │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────╯