╭ changed ───────────────╮ │src/test/event/patch.zig│ ╰────────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │242 pch.refreshMergeability(opts, io, allocator, &repo, path, id); │ │243 │ │244 // both merge styles use the stored revision, without fork data │ │245 - try pch.merge(opts, io, allocator, path, &repo, .{ .id = id_hex, .revision = selection, .author = author, .timestamp = 100 }); │ │245 + try pch.merge(opts, io, allocator, .{ .users_dir = path }, &repo, .{ .id = id_hex, .revision = selection, .author = author, .timestamp = 100 });│ │246 const merged = (try evt.readFromRepo(evt.Patch, .xit, opts, io, allocator, &arena, &repo, &id)) orelse return error.NotFound; │ │247 const merged_status = switch (merged.event.status) { │ │248 .merged => |value| value, │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────╮ │982 .timestamp = 3, │ │983 }); │ │984 defer allocator.free(unpushed_path); │ │985 - try pch.publish(repo_opts, io, allocator, users_dir, &admin, &target, .{ │ │985 + try pch.publish(repo_opts, io, allocator, .{ .users_dir = users_dir }, &admin, &target, .{│ │986 .id = unpushed_id_hex, │ │987 .user_id = user_id, │ │988 .repo_id = repo_id, │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1024 // │ │1025 │ │1026 const before_publish = try target.core.db.rootCursor().count(); │ │1027 - try pch.publish(repo_opts, io, allocator, users_dir, &admin, &target, .{ │ │1027 + try pch.publish(repo_opts, io, allocator, .{ .users_dir = users_dir }, &admin, &target, .{│ │1028 .id = patch_id_hex, │ │1029 .user_id = user_id, │ │1030 .repo_id = repo_id, │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1032 .timestamp = 5, │ │1033 }); │ │1034 try std.testing.expectEqual(before_publish + 1, try target.core.db.rootCursor().count()); │ │1035 - try pch.publish(repo_opts, io, allocator, users_dir, &admin, &target, .{ │ │1035 + try pch.publish(repo_opts, io, allocator, .{ .users_dir = users_dir }, &admin, &target, .{│ │1036 .id = patch_id_hex, │ │1037 .user_id = user_id, │ │1038 .repo_id = repo_id, │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1084 // │ │1085 │ │1086 try evt.Patch.update(.{ .server = .{ .users_dir = users_dir } }, .xit, repo_opts, io, allocator, &target, &patch_id, .{ .status = .closed }, author);│ │1087 - try std.testing.expectError(error.PatchClosed, pch.merge(repo_opts, io, allocator, users_dir, &target, .{ │ │1087 + try std.testing.expectError(error.PatchClosed, pch.merge(repo_opts, io, allocator, .{ .users_dir = users_dir }, &target, .{ │ │1088 .id = patch_id_hex, │ │1089 .revision = merge_revision, │ │1090 .author = author, │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1101 .squash => squash_oid, │ │1102 .source => source_oid, │ │1103 }; │ │1104 - try pch.mergeAndRemoveFork(repo_opts, io, allocator, users_dir, &target, .{ │ │1104 + try pch.mergeAndRemoveFork(repo_opts, io, allocator, .{ .users_dir = users_dir }, &target, .{│ │1105 .id = patch_id_hex, │ │1106 .revision = merge_revision, │ │1107 .author = author, │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1221 var squash_input = input; │ │1222 squash_input.revision = .squash; │ │1223 try std.testing.expectEqualDeep(pch.Mergeability{}, try readMergeability(target, io, allocator, id, patch)); │ │1224 - try std.testing.expectError(error.MergeCheckUnavailable, pch.merge(repo_opts, io, allocator, users_dir, target, input)); │ │1225 - try std.testing.expectError(error.MergeCheckUnavailable, pch.merge(repo_opts, io, allocator, users_dir, target, squash_input)); │ │1224 + try std.testing.expectError(error.MergeCheckUnavailable, pch.merge(repo_opts, io, allocator, .{ .users_dir = users_dir }, target, input)); │ │1225 + try std.testing.expectError(error.MergeCheckUnavailable, pch.merge(repo_opts, io, allocator, .{ .users_dir = users_dir }, target, squash_input));│ │1226 │ │1227 // local edits and server comments leave checks alone │ │1228 var edit = evt.Patch.Update{ .fields = .{ │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1244 const events_before = try target.readRef(io, evt.events_ref); │ │1245 try std.testing.expectEqualDeep(pch.Mergeability{ .source = .conflict, .squash = .conflict }, try readMergeability(target, io, allocator, id, patch));│ │1246 try expectMergeabilityShortBytes(try target.core.latestMoment(), id); │ │1247 - try std.testing.expectError(error.MergeConflict, pch.merge(repo_opts, io, allocator, users_dir, target, input)); │ │1248 - try std.testing.expectError(error.MergeConflict, pch.merge(repo_opts, io, allocator, users_dir, target, squash_input)); │ │1247 + try std.testing.expectError(error.MergeConflict, pch.merge(repo_opts, io, allocator, .{ .users_dir = users_dir }, target, input)); │ │1248 + try std.testing.expectError(error.MergeConflict, pch.merge(repo_opts, io, allocator, .{ .users_dir = users_dir }, target, squash_input)); │ │1249 try std.testing.expectEqual(events_before, try target.readRef(io, evt.events_ref)); │ │1250 try std.testing.expectEqual(conflicting_target, (try target.readRef(io, .{ .kind = .head, .name = "master" })).?); │ │1251 try std.testing.expectEqual(null, try target.readRef(io, .{ .kind = .none, .name = "MERGE_HEAD" })); │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1279 const log_level = std.testing.log_level; │ │1280 std.testing.log_level = .err; │ │1281 defer std.testing.log_level = log_level; │ │1282 - try std.testing.expectError(error.PatchDataUnavailable, pch.merge(repo_opts, io, allocator, users_dir, target, input)); │ │1282 + try std.testing.expectError(error.PatchDataUnavailable, pch.merge(repo_opts, io, allocator, .{ .users_dir = users_dir }, target, input));│ │1283 } │ │1284 try std.testing.expectEqualDeep(pch.Mergeability{}, try readMergeability(target, io, allocator, id, patch)); │ │1285 try std.testing.expectEqual(events_before, try target.readRef(io, evt.events_ref)); │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯