╭ changed ──────────╮ │src/event/Patch.zig│ ╰───────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭───────────────────────────────────────────────────────╮ │ 8 tags: []const u8, // space-separated │ │ 9 target_ref: []const u8, │ │10 target_patch_id: ?[evt.event_id_size * 2]u8 = null,│ │11 -source_url: []const u8, │ │12 -source_ref: []const u8, │ │11 patchrev_id: [evt.event_id_size * 2]u8, │ │12 │ │13 pub const Record = struct { │ ╰───────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────╮ │64 break :blk value; │ │65 }; │ │66 │ │69 - if (!fieldsValid(record.event.title, record.event.tags) or │ │70 - record.event.target_ref.len == 0 or │ │71 - record.event.source_url.len == 0 or │ │72 - record.event.source_ref.len == 0) │ │73 - { │ │67 + if (!fieldsValid(record.event.title, record.event.tags) or record.event.target_ref.len == 0) {│ │68 return error.InvalidPatch; │ │69 } │ │70 const patchrev_id = try evt.parseEventId(&record.event.patchrev_id); │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────╮ │77 record.created_order = existing.created_order; │ │78 record.author_email = existing.author_email; │ │79 if (event_oid != null) { │ │86 - if (!std.mem.eql(u8, existing.event.target_ref, record.event.target_ref) or │ │87 - !std.meta.eql(existing.event.target_patch_id, record.event.target_patch_id) or│ │88 - !std.mem.eql(u8, existing.event.source_url, record.event.source_url) or │ │89 - !std.mem.eql(u8, existing.event.source_ref, record.event.source_ref)) │ │90 - { │ │91 - return error.PatchTargetChanged; │ │80 + if (!std.meta.eql(existing.event.target_patch_id, record.event.target_patch_id)) {│ │81 + return error.TargetPatchChanged; │ │82 } │ │83 } │ │84 if (event_oid != null or record.removed) { │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯