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

Method has_git_sha

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

Check if a Git SHA has been indexed.

(&self, git_sha: &str)

Source from the content-addressed store, hash-verified

2608
2609 /// Check if a Git SHA has been indexed.
2610 pub fn has_git_sha(&self, git_sha: &str) -> Result<bool, RepositoryError> {
2611 use atomic_core::pristine::GitShaIndexTxnT;
2612
2613 let txn = self
2614 .pristine
2615 .read_txn()
2616 .map_err(|e| RepositoryError::Database(e.to_string()))?;
2617
2618 txn.has_git_sha(git_sha)
2619 .map_err(|e| RepositoryError::Database(e.to_string()))
2620 }
2621
2622 /// Backfill the GIT_SHA_INDEX from existing imported changes.
2623 ///

Callers 1

Calls 1

read_txnMethod · 0.80

Tested by

no test coverage detected