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

Method has_git_sha

atomic-repository/src/repository/insert.rs:2703–2713  ·  view source on GitHub ↗

Check if a Git SHA has been indexed.

(&self, git_sha: &str)

Source from the content-addressed store, hash-verified

2701
2702 /// Check if a Git SHA has been indexed.
2703 pub fn has_git_sha(&self, git_sha: &str) -> Result<bool, RepositoryError> {
2704 use atomic_core::pristine::GitShaIndexTxnT;
2705
2706 let txn = self
2707 .pristine
2708 .read_txn()
2709 .map_err(|e| RepositoryError::Database(e.to_string()))?;
2710
2711 txn.has_git_sha(git_sha)
2712 .map_err(|e| RepositoryError::Database(e.to_string()))
2713 }
2714
2715 /// Backfill the GIT_SHA_INDEX from existing imported changes.
2716 ///

Callers 2

index_git_shasMethod · 0.45

Calls 1

read_txnMethod · 0.80

Tested by

no test coverage detected