pub fn head_oid(&self) -> anyhow::Result<git2::Oid> {
        let repo = &self.repository;
        let head = repo.head().context("Failed to read HEAD reference")?;
        Ok(head.target().unwrap())
    }
/// Returns the [Object ID](git2::Oid) of the currently checked out commit
/// in the local crate index repository.
///
/// # Errors
///
/// - If the `HEAD` pointer can't be retrieved.
///
Returns the [Object ID](git2::Oid) of the currently checked out commit
in the local crate index repository.
Returns the [ Object ID ] ( git2 :: Oid ) of the currently checked out commit in the local crate index repository .
pub fn head_oid(&self) -> anyhow::Result<git2::Oid> {
        let repo = &self.repository;
        let head = repo.head().context("Failed to read HEAD reference")?;
        Ok(head.target().unwrap())
    }
pub fn head_oid ( & self ) -> anyhow :: Result < git2 :: Oid > { let repo = & self . repository ; let head = repo . head ( ) . context ( " " ) ? ; Ok ( head . target ( ) . unwrap ( ) ) }
Returns the [Object ID](git2::Oid) of the currently checked out commit
in the local crate index repository.
Returns the [ Object ID ] ( git2 :: Oid ) of the currently checked out commit in the local crate index repository .
&self
errors
If the `HEAD` pointer can't be retrieved.
If the ` HEAD ` pointer can ' t be retrieved .