╭ changed ──╮ │src/try.zig│ ╰───────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │960 defer file.close(io); │ │961 try file.writeStreamingAll(io, content); │ │962 } │ │963 + │ │964 +const ScatterEdit = struct { line: usize, text: []const u8 }; │ │965 │ │964 -fn scatterContent(allocator: std.mem.Allocator, fi: usize, c: usize, replacement: ?struct { line: usize, text: []const u8 }) ![]u8 {│ │966 +fn scatterContent(allocator: std.mem.Allocator, fi: usize, c: usize, replacement: ?ScatterEdit) ![]u8 { │ │967 var writer = std.Io.Writer.Allocating.init(allocator); │ │968 defer writer.deinit(); │ │969 for (0..40) |line| { │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────╮ │1111 description: []const u8, │ │1112 tags: []const u8, │ │1113 status: ?evt.Patch.StatusKind, │ │1112 - adjacent_edit: bool = false, │ │1114 + alpha_edit: ?ScatterEdit = null, │ │1115 }{ │ │1116 .{ │ │1117 .title = "Draft a faster dependency scanner",│ ╰───────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1142 .description = "This patch can be cleanly merged by haxy, while git throws a merge conflict!", │ │1143 .tags = "merge", │ │1144 .status = .open, │ │1143 - .adjacent_edit = true, │ │1145 + .alpha_edit = .{ .line = 2, .text = "adjust alpha beside the latest scatter edit" }, │ │1146 }, │ │1147 .{ │ │1146 - .title = "Preserve file permissions during export", │ │1147 - .description = "Carry executable bits through archive exports so unpacked command-line tools remain runnable without a manual chmod step.",│ │1148 - .tags = "bug export permissions", │ │1148 + .title = "Edit a conflicting line in alpha.txt", │ │1149 + .description = "Both source and squash merges conflict with a different edit to the same line on master.", │ │1150 + .tags = "merge", │ │1151 .status = .open, │ │1152 + .alpha_edit = .{ .line = 3, .text = "replace alpha with a conflicting edit" }, │ │1153 }, │ │1154 }; │ │1155 │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1181 const aa = arena.allocator(); │ │1182 var base_oid = (try target_repo.readRef(io, .{ .kind = .head, .name = "master" })) orelse return error.NotFound; │ │1183 var contents: [3][]const u8 = undefined; │ │1181 - const file_path: []const u8, const count: usize = if (patch.adjacent_edit) blk: { │ │1184 + const file_path: []const u8, const count: usize = if (patch.alpha_edit) |edit| blk: { │ │1185 // v30 precedes the last scatter commit, even after the sample merge │ │1186 const tag_oid = (try target_repo.readRef(io, .{ .kind = .tag, .name = "v30" })) orelse return error.NotFound;│ │1187 var moment = try target_repo.core.latestMoment(); │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1192 .tag => |value| value.target, │ │1193 else => return error.InvalidObject, │ │1194 }; │ │1192 - // rev 29 first changes line 4; edit the line above it in rev 28 │ │1193 - contents[0] = try scatterContent(aa, 0, 28, .{ .line = 2, .text = "adjust alpha beside the latest scatter edit" });│ │1195 + // rev 29 first changes line 4; edit that line or the one above it │ │1196 + contents[0] = try scatterContent(aa, 0, 28, edit); │ │1197 break :blk .{ "src/alpha.txt", 1 }; │ │1198 } else blk: { │ │1199 var writer = std.Io.Writer.Allocating.init(allocator); │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────╮ │1339 } │ │1340 try target_repo.removeBranch(io, .{ .name = other_ref.name }); │ │1341 try evt.consume(.repo, .xit, .{}, io, allocator, target_repo, evt.events_ref, &.{});│ │1342 + pch.refreshMergeability(.{}, io, allocator, target_repo, null); │ │1343 } │ │1344 │ │1345 // recursively copy the contents of src_dir into dest_dir │ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯