╭ changed ────╮ │src/event.zig│ ╰─────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1003 .base_tree_oid = &trees.base, │ │1004 .head_tree_oid = &trees.head, │ │1005 .patch_oid = &patch_oid, │ │1006 + .commit_count = PatchRev.commitCount(repo_kind, repo_opts, read_state, io, allocator, event.base_oid, event.source_oid) catch null,│ │1007 }; │ │1008 } else null; │ │1009 try PatchRev.consume(DB, repo_opts.hash, haxy_moment, &current_event_id, record_maybe, &arena, &repo_event_oid); │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1625 if (optional_info.child == []const u8) { │ │1626 @field(event, field.name) = try cursor.readBytesAlloc(arena.allocator(), null); │ │1627 } else switch (@typeInfo(optional_info.child)) { │ │1628 + .int => |int_info| switch (int_info.signedness) { │ │1629 + .unsigned => @field(event, field.name) = @intCast(try cursor.readUint()), │ │1630 + .signed => @field(event, field.name) = @intCast(try cursor.readInt()), │ │1631 + }, │ │1632 .array => |array_info| { │ │1633 if (array_info.child != u8) @compileError("unsupported read field type: " ++ @typeName(field.type));│ │1634 var bytes: optional_info.child = undefined; │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1857 .optional => |optional_info| { │ │1858 // a missing key is null │ │1859 if (value) |child| { │ │1855 - if (optional_info.child == []const u8) { │ │1856 - try upsertBytes(DB, hash_kind, map, key, child); │ │1857 - } else switch (@typeInfo(optional_info.child)) { │ │1858 - .array => |array_info| { │ │1859 - if (array_info.child != u8) @compileError("unsupported upsert field type: " ++ @typeName(Field));│ │1860 - try upsertBytes(DB, hash_kind, map, key, &child); │ │1861 - }, │ │1862 - .@"struct" => try upsert( │ │1863 - optional_info.child, │ │1864 - DB, │ │1865 - hash_kind, │ │1866 - try DB.HashMap(.read_write).init(try map.putCursor(key)), │ │1867 - child, │ │1868 - ), │ │1869 - else => @compileError("unsupported upsert field type: " ++ @typeName(Field)), │ │1870 - } │ │1860 + try upsertField(DB, hash_kind, map, field_name, optional_info.child, child); │ │1861 } else { │ │1862 _ = try map.remove(key); │ │1863 } │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯