MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / delete_change

Method delete_change

atomic-repository/src/repository/changes.rs:1238–1242  ·  view source on GitHub ↗

Delete a change from the repository. This removes the change file from disk and from the cache. Note that this does NOT remove the change from any stacks - use `unrecord` for that. # Arguments `hash` - The hash of the change to delete # Returns `true` if the change was deleted, `false` if it didn't exist. # Errors Returns an error if the file exists but cannot be deleted. # Warning Deleti

(&self, hash: &Hash)

Source from the content-addressed store, hash-verified

1236 /// Deleting a change that is still referenced by a view will cause
1237 /// errors when trying to access that view. Use with caution.
1238 pub fn delete_change(&self, hash: &Hash) -> Result<bool, RepositoryError> {
1239 self.change_store
1240 .delete_change(hash)
1241 .map_err(|e| RepositoryError::Database(e.to_string()))
1242 }
1243
1244 /// Count the number of changes stored in the repository.
1245 ///

Callers 1

test_repo_delete_changeFunction · 0.45

Calls

no outgoing calls

Tested by 1

test_repo_delete_changeFunction · 0.36