Apply all FileOps from a change to the CRDT tables. This populates TRUNKS, BRANCHES, and LEAVES tables with the semantic layer data, enabling human-readable diffs and token-level blame. # Arguments `txn` - Mutable transaction for database writes `change_id` - The NodeId of the change being applied `file_ops` - The FileOps to apply # Returns Statistics about what was applied. # Example ```ru
(
txn: &mut T,
change_id: NodeId,
file_ops: &[FileOps],
)
| 165 | /// let stats = apply_file_ops(&mut txn, change_id, change.file_ops())?; |
| 166 | /// ``` |
| 167 | pub fn apply_file_ops<T: MutTxnT>( |
| 168 | txn: &mut T, |
| 169 | change_id: NodeId, |
| 170 | file_ops: &[FileOps], |
| 171 | ) -> PristineResult<ApplyFileOpsStats> { |
| 172 | apply_file_ops_with_inodes(txn, change_id, file_ops, &HashMap::new()) |
| 173 | } |
| 174 | |
| 175 | fn apply_file_ops_with_inodes<T: MutTxnT>( |
| 176 | txn: &mut T, |
nothing calls this directly
no test coverage detected