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

Method has_git_sha

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

Check if a Git SHA has been indexed.

(&self, git_sha: &str)

Source from the content-addressed store, hash-verified

2752
2753 /// Check if a Git SHA has been indexed.
2754 pub fn has_git_sha(&self, git_sha: &str) -> Result<bool, RepositoryError> {
2755 use atomic_core::pristine::GitShaIndexTxnT;
2756
2757 let txn = self
2758 .pristine
2759 .read_txn()
2760 .map_err(|e| RepositoryError::Database(e.to_string()))?;
2761
2762 txn.has_git_sha(git_sha)
2763 .map_err(|e| RepositoryError::Database(e.to_string()))
2764 }
2765
2766 /// Backfill the GIT_SHA_INDEX from existing imported changes.
2767 ///

Callers 2

index_git_shasMethod · 0.45

Calls 1

read_txnMethod · 0.80

Tested by

no test coverage detected