╭ changed ───╮ │src/fork.zig│ ╰────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭────────────────────────────────────╮ │1 const std = @import("std"); │ │2 const evt = @import("event.zig");│ │3 +const find = @import("find.zig");│ │4 const xit = @import("xit"); │ │5 const rp = xit.repo; │ │6 const hash = xit.hash; │ ╰────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │162 try fork_repo.addConfig(io, allocator, .{ .name = "core.bare", .value = "true" }); │ │163 try fork_repo.addConfig(io, allocator, .{ .name = "receive.denydeletes", .value = "true" }); │ │164 │ │165 + // the copied db carries the target's file index, so the patch branch's │ │166 + // entry starts from one of those rather than walking the tree │ │167 + find.refresh(repo_opts, io, allocator, &fork_repo) catch |err| { │ │168 + std.log.warn("failed to refresh file index: {s}", .{@errorName(err)}); │ │169 + }; │ │170 + │ │171 // create the patch event │ │172 try evt.consume(.server, .fork, .xit, repo_opts, io, allocator, &fork_repo, evt.events_ref, &.{.{│ │173 .id = input.id, │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────╯