╭ changed ────╮ │src/patch.zig│ ╰─────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1125 // retain the submitted revision and snapshot the merge result │ │1126 if (!try importMergedRevision(repo_opts, state, &ctx.core.db, &moment, ctx.io, ctx.allocator, ctx.fork_repo, &ctx.patch_id, .{ .revision = ctx.revision, .before_oid = &before_oid, .after_oid = &after_oid }, ctx.expected_patch, ctx.author, ctx.timestamp)) return error.PatchOutOfDate;│ │1127 │ │1128 + // the merge moved the target branch, so its indexes follow, │ │1129 + // the commit index deriving from the old tip's version │ │1130 + _ = try find.refreshInTransaction(repo_opts, state, &moment, ctx.io, ctx.allocator, null); │ │1131 + _ = try srch_cmmt.refreshInTransaction(repo_opts, state, &moment, ctx.io, ctx.allocator, &.{.{ .old_oid = &before_oid, .new_oid = &after_oid }}, null); │ │1132 + │ │1133 // record the merge as one undoable action. │ │1134 try xit.undo.write(repo_opts, state, std.Io.Timestamp.now(ctx.io, .real).toSeconds(), .{ .custom = .{ .action_kind = merge_undo_action } }); │ │1135 } │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────╮ │1160 │ │1161 // refresh other patches affected by the updated target branch. │ │1162 refreshOpenMergeability(repo_opts, io, allocator, target_repo, null, null); │ │1158 - │ │1159 - // the merge moved the target branch, so its indexes follow │ │1160 - find.refresh(repo_opts, io, allocator, target_repo) catch |err| { │ │1161 - std.log.warn("failed to refresh file index: {s}", .{@errorName(err)}); │ │1162 - }; │ │1163 - srch_cmmt.refresh(repo_opts, io, allocator, target_repo, null) catch |err| {│ │1164 - std.log.warn("failed to refresh commit index: {s}", .{@errorName(err)});│ │1165 - }; │ │1163 } │ │1164 │ │1165 // merge a published patch and remove its fork │ ╰──────────────────────────────────────────────────────────────────────────────────────╯