╭ changed ───────────────╮ │src/test/event/patch.zig│ ╰────────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────╮ │← previous│ ╰──────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1093 │ │1094 // run the cache scenario once; both lifecycle runs still perform a merge │ │1095 if (merge_revision == .source) { │ │1096 - try testMergeability(&target, io, allocator, repos_dir, &patch_id, &base_oid, &source_oid); │ │1096 + try testMergeability(&target, io, allocator, users_dir, &user_id, &patch_id, &base_oid, &source_oid);│ │1097 } │ │1098 │ │1099 const selected_oid = switch (merge_revision) { │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────╮ │1100 .squash => squash_oid, │ │1101 .source => source_oid, │ │1102 }; │ │1103 - try pch.mergeAndRemoveFork(repo_opts, io, allocator, repos_dir, &target, .{│ │1103 + try pch.mergeAndRemoveFork(repo_opts, io, allocator, users_dir, &target, .{│ │1104 .id = patch_id_hex, │ │1105 .revision = merge_revision, │ │1106 .author = author, │ ╰─────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────╮ │1183 target: *Repo, │ │1184 io: std.Io, │ │1185 allocator: std.mem.Allocator, │ │1186 - repos_dir: []const u8, │ │1186 + users_dir: []const u8, │ │1187 + forker_id: *const [evt.event_id_size]u8, │ │1188 id: *const [evt.event_id_size]u8, │ │1189 base: *const [hash.hexLen(repo_opts.hash)]u8, │ │1190 source: *const [hash.hexLen(repo_opts.hash)]u8,│ ╰─────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1220 var squash_input = input; │ │1221 squash_input.revision = .squash; │ │1222 try std.testing.expectEqualDeep(pch.Mergeability{}, try readMergeability(target, io, allocator, id, patch)); │ │1222 - try std.testing.expectError(error.MergeCheckUnavailable, pch.merge(repo_opts, io, allocator, repos_dir, target, input)); │ │1223 - try std.testing.expectError(error.MergeCheckUnavailable, pch.merge(repo_opts, io, allocator, repos_dir, target, squash_input));│ │1223 + try std.testing.expectError(error.MergeCheckUnavailable, pch.merge(repo_opts, io, allocator, users_dir, target, input)); │ │1224 + try std.testing.expectError(error.MergeCheckUnavailable, pch.merge(repo_opts, io, allocator, users_dir, target, squash_input));│ │1225 │ │1226 // local edits and server comments leave checks alone │ │1227 var edit = evt.Patch.Update{ .fields = .{ │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1243 const events_before = try target.readRef(io, evt.events_ref); │ │1244 try std.testing.expectEqualDeep(pch.Mergeability{ .source = .conflict, .squash = .conflict }, try readMergeability(target, io, allocator, id, patch));│ │1245 try expectMergeabilityShortBytes(try target.core.latestMoment(), id); │ │1245 - try std.testing.expectError(error.MergeConflict, pch.merge(repo_opts, io, allocator, repos_dir, target, input)); │ │1246 - try std.testing.expectError(error.MergeConflict, pch.merge(repo_opts, io, allocator, repos_dir, target, squash_input)); │ │1246 + try std.testing.expectError(error.MergeConflict, pch.merge(repo_opts, io, allocator, users_dir, target, input)); │ │1247 + try std.testing.expectError(error.MergeConflict, pch.merge(repo_opts, io, allocator, users_dir, target, squash_input)); │ │1248 try std.testing.expectEqual(events_before, try target.readRef(io, evt.events_ref)); │ │1249 try std.testing.expectEqual(conflicting_target, (try target.readRef(io, .{ .kind = .head, .name = "master" })).?); │ │1250 try std.testing.expectEqual(null, try target.readRef(io, .{ .kind = .none, .name = "MERGE_HEAD" })); │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1267 try std.testing.expectEqualDeep(clean, try readMergeability(target, io, allocator, id, patch));│ │1268 │ │1269 // a missing fork disables merging without changing the accepted events │ │1269 - const draft_path = try fork.forkPath(allocator, repos_dir, &std.fmt.bytesToHex(id.*, .lower)); │ │1270 + const draft_path = try fork.forkPath(allocator, users_dir, forker_id, id); │ │1271 defer allocator.free(draft_path); │ │1272 const away_path = try std.fmt.allocPrint(allocator, "{s}.away", .{draft_path}); │ │1273 defer allocator.free(away_path); │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1278 const log_level = std.testing.log_level; │ │1279 std.testing.log_level = .err; │ │1280 defer std.testing.log_level = log_level; │ │1280 - try std.testing.expectError(error.PatchDataUnavailable, pch.merge(repo_opts, io, allocator, repos_dir, target, input));│ │1281 + try std.testing.expectError(error.PatchDataUnavailable, pch.merge(repo_opts, io, allocator, users_dir, target, input));│ │1282 } │ │1283 try std.testing.expectEqualDeep(pch.Mergeability{}, try readMergeability(target, io, allocator, id, patch)); │ │1284 try std.testing.expectEqual(events_before, try target.readRef(io, evt.events_ref)); │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯