╭ changed ───╮ │src/fork.zig│ ╰────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │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 + // the copied db carries the target's file index, so the patch │ │162 + // branch's entry starts from one of those rather than walking │ │163 + // the tree │ │164 + _ = try find.refreshInTransaction(repo_opts, state, &moment, ctx.io, ctx.allocator, null); │ │165 │ │166 try xit.undo.write(repo_opts, state, std.Io.Timestamp.now(ctx.io, .real).toSeconds(), .{ .custom = .{ .action_kind = undo_action } });│ │167 } │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │177 ); │ │178 } │ │179 │ │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| { │ │178 - std.log.warn("failed to refresh file index: {s}", .{@errorName(err)}); │ │179 - }; │ │180 - │ │180 // create the patch event │ │181 try evt.consume(.server, .fork, .xit, repo_opts, io, allocator, &fork_repo, evt.events_ref, &.{.{│ │182 .id = input.id, │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────╯