Save a downloaded change to the repository's change store. Writes the change data to the appropriate location in the repository's `.atomic/changes/` directory structure. # Arguments `repo` - The repository to save to `hash` - The expected hash of the change (for verification) `data` - The raw change file data # Returns `Ok(())` on success, or an appropriate error. # Errors - `CliError::Inte
(repo: &Repository, hash: &Hash, data: Bytes)
| 368 | /// save_downloaded_change(&repo, &expected_hash, data)?; |
| 369 | /// ``` |
| 370 | pub fn save_downloaded_change(repo: &Repository, hash: &Hash, data: Bytes) -> CliResult<()> { |
| 371 | repo.import_change_bytes(hash, &data) |
| 372 | .map(|_| ()) |
| 373 | .map_err(|e| CliError::Internal(anyhow::anyhow!("Failed to save change: {}", e))) |
| 374 | } |
| 375 | |
| 376 | // View Manifests |
| 377 |
no test coverage detected