╭ changed ────╮ │src/patch.zig│ ╰─────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1088 input: MergeInput, │ │1089 ) !void { │ │1090 const patch_id = try evt.parseEventId(&input.id); │ │1091 - errdefer |err| { │ │1091 + mergeInner(repo_opts, io, allocator, users_dir, target_repo, input, patch_id) catch |err| {│ │1092 if (err == error.PatchDataUnavailable or err == error.PatchOutOfDate) { │ │1093 refreshMergeability(repo_opts, io, allocator, target_repo, users_dir, patch_id); │ │1094 } │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────╮ │1095 - } │ │1095 + return err; │ │1096 + }; │ │1097 +} │ │1098 + │ │1099 +fn mergeInner( │ │1100 + comptime repo_opts: rp.RepoOpts(.xit), │ │1101 + io: std.Io, │ │1102 + allocator: std.mem.Allocator, │ │1103 + users_dir: []const u8, │ │1104 + target_repo: *rp.Repo(.xit, repo_opts), │ │1105 + input: MergeInput, │ │1106 + patch_id: [evt.event_id_size]u8, │ │1107 +) !void { │ │1108 var arena = std.heap.ArenaAllocator.init(allocator);│ │1109 defer arena.deinit(); │ │1110 │ ╰──────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1135 .squash => selected.squash_oid, │ │1136 .source => selected.source_oid, │ │1137 }) catch return error.InvalidPatch; │ │1126 - const identity = try std.fmt.allocPrint(arena.allocator(), "{s} <{s}>", .{ input.author.name, input.author.email });│ │1138 + const identity = try arena.allocator().print("{s} <{s}>", .{ input.author.name, input.author.email }); │ │1139 │ │1140 // merge the code and events in one target transaction │ │1141 { │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯