(
repo: &Repository,
txn: &atomic_core::pristine::ReadTxn,
inode: Inode,
view_name: &str,
visibility: &GraphVisibilityClosure,
)
| 5260 | } |
| 5261 | |
| 5262 | fn existing_crdt_identity( |
| 5263 | repo: &Repository, |
| 5264 | txn: &atomic_core::pristine::ReadTxn, |
| 5265 | inode: Inode, |
| 5266 | view_name: &str, |
| 5267 | visibility: &GraphVisibilityClosure, |
| 5268 | ) -> Result< |
| 5269 | ( |
| 5270 | Option<atomic_core::crdt::TrunkId>, |
| 5271 | Vec<atomic_core::crdt::BranchId>, |
| 5272 | ), |
| 5273 | RecordError, |
| 5274 | > { |
| 5275 | let trunk = repo |
| 5276 | .canonical_semantic_trunk(txn, &format!("inode {}", inode.get()), inode) |
| 5277 | .map_err(RecordError::Database)?; |
| 5278 | let Some(trunk) = trunk else { |
| 5279 | return Ok((None, Vec::new())); |
| 5280 | }; |
| 5281 | // Folded through the view's closure, never read from the shared rows: a |
| 5282 | // WIP evidence snapshot tombstones the moved file's rows globally, and a |
| 5283 | // whole-file replace built from the global alive set then tombstoned |
| 5284 | // nothing, leaving the old lines alive next to the fresh ones. |
| 5285 | let branches = repo |
| 5286 | .view_alive_branches_in_order(txn, view_name, visibility, trunk) |
| 5287 | .map_err(RecordError::Database)?; |
| 5288 | Ok((Some(trunk), branches)) |
| 5289 | } |
| 5290 | |
| 5291 | /// Look up inode + position for a path using a shared read transaction. |
| 5292 | fn get_inode_position( |
no test coverage detected