| 116 | /// per-section zstd compression, and incremental blake3 hashing. |
| 117 | #[derive(Clone, Debug)] |
| 118 | pub struct Change { |
| 119 | /// The hashed portion (contributes to change hash) |
| 120 | pub hashed: HashedChange, |
| 121 | |
| 122 | /// Optional unhashed metadata (JSON) |
| 123 | /// |
| 124 | /// This can contain arbitrary data that doesn't affect the change hash. |
| 125 | /// Useful for storing editor metadata, review comments, AI transcripts, etc. |
| 126 | pub unhashed: Option<serde_json::Value>, |
| 127 | |
| 128 | /// Binary content blob |
| 129 | /// |
| 130 | /// This contains the actual file content referenced by hunks. |
| 131 | /// Hunks reference byte ranges within this blob. |
| 132 | pub contents: Vec<u8>, |
| 133 | } |
| 134 | |
| 135 | impl Change { |
| 136 | /// Create a new change. |
no outgoing calls