╭ changed ───╮ │src/fork.zig│ ╰────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────────────────────────────────────────────────────────────────────────────╮ │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| { │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────╯