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

Method has_git_sha

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

Check if a Git SHA has been indexed.

(&self, git_sha: &str)

Source from the content-addressed store, hash-verified

2807
2808 /// Check if a Git SHA has been indexed.
2809 pub fn has_git_sha(&self, git_sha: &str) -> Result<bool, RepositoryError> {
2810 use atomic_core::pristine::GitShaIndexTxnT;
2811
2812 let txn = self
2813 .pristine
2814 .read_txn()
2815 .map_err(|e| RepositoryError::Database(e.to_string()))?;
2816
2817 txn.has_git_sha(git_sha)
2818 .map_err(|e| RepositoryError::Database(e.to_string()))
2819 }
2820
2821 /// Backfill the GIT_SHA_INDEX from existing imported changes.
2822 ///

Callers 2

index_git_shasMethod · 0.45

Calls 1

read_txnMethod · 0.80

Tested by

no test coverage detected