The raw `GIT_SHA_INDEX` row for one SHA: the mapped change must be registered, loadable, and decode to exactly its claimed identity. Used only to *shortlist* binding candidates — never as identity.
(&self, sha: &str)
| 649 | /// registered, loadable, and decode to exactly its claimed identity. |
| 650 | /// Used only to *shortlist* binding candidates — never as identity. |
| 651 | fn raw_git_sha_row(&self, sha: &str) -> Result<Option<Hash>, RepositoryError> { |
| 652 | use atomic_core::pristine::{GitShaIndexTxnT, GraphTxnT}; |
| 653 | let txn = self.pristine.read_txn().map_err(pristine_map)?; |
| 654 | let Some(change_id) = txn.get_by_git_sha(sha).map_err(pristine_map)? else { |
| 655 | return Ok(None); |
| 656 | }; |
| 657 | let Some(hash) = txn.get_external(change_id).map_err(pristine_map)? else { |
| 658 | return Ok(None); |
| 659 | }; |
| 660 | drop(txn); |
| 661 | if !self.has_change(&hash) { |
| 662 | return Ok(None); |
| 663 | } |
| 664 | match self.load_change(&hash) { |
| 665 | Ok(_) => Ok(Some(hash)), |
| 666 | Err(_) => Ok(None), |
| 667 | } |
| 668 | } |
| 669 | |
| 670 | /// The checked import skip markers over the whole `GIT_SHA_INDEX`. |
| 671 | /// |
no test coverage detected