╭ changed ──╮ │src/try.zig│ ╰───────────╯ ╭─────────────────────────────────────────────────────────────────────────────────╮ │1340 }, null, patch_author); │ │1341 } │ │1342 │ │1343 -// commit `events` onto `ref`, rooted at `parent`, as one undoable step. │ │1343 +// commit `events` onto `ref`, rooted at `parent`, as one transaction. │ │1344 // consume always roots a new branch at nothing, so the divergent fixtures │ │1345 -// write their side branch here instead, recording the action consume would│ │1345 +// write their side branch here instead. nothing is consumed, so it records│ │1346 +// xit's own commit action rather than one of haxy's event actions │ │1347 fn commitEventsAtRef( │ │1348 io: std.Io, │ │1349 allocator: std.mem.Allocator, │ ╰─────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1363 parent: [hash.hexLen(.sha1)]u8, │ │1364 │ │1365 pub fn run(ctx: @This(), cursor: *DB.Cursor(.read_write)) !void { │ │1366 + const opts: rp.RepoOpts(.xit) = .{}; │ │1367 var moment = try DB.HashMap(.read_write).init(cursor.*); │ │1368 const state = Repo.State(.read_write){ .core = ctx.core, .extra = .{ .moment = &moment } }; │ │1367 - try evt.commitEvents(.xit, .{}, state, ctx.io, ctx.allocator, ctx.ref, ctx.events, .{ctx.parent}); │ │1368 - try xit.undo.write(.{}, state, std.Io.Timestamp.now(ctx.io, .real).toSeconds(), .{ .custom = .{ .action = evt.undo_action } });│ │1369 + try evt.commitEvents(.xit, opts, state, ctx.io, ctx.allocator, ctx.ref, ctx.events, .{ctx.parent}); │ │1370 + const tip = (try xit.ref.readRecur(.xit, opts, state.readOnly(), ctx.io, .{ .ref = ctx.ref })) orelse return error.NotFound; │ │1371 + try xit.undo.write(opts, state, std.Io.Timestamp.now(ctx.io, .real).toSeconds(), .{ │ │1372 + .commit = try .init("seed conflicting events", tip, opts.max_read_size), │ │1373 + }); │ │1374 } │ │1375 }; │ │1376 │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯