Skip to content

Commit 5ee5b93

Browse files
committed
Repository: Add doc comment for head_oid()
1 parent c45ac7f commit 5ee5b93

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/git.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,13 @@ impl Repository {
212212
}
213213
}
214214

215+
/// Returns the [Object ID](git2::Oid) of the currently checked out commit
216+
/// in the local crate index repository.
217+
///
218+
/// # Errors
219+
///
220+
/// - If the `HEAD` pointer can't be retrieved.
221+
///
215222
pub fn head_oid(&self) -> Result<git2::Oid, PerformError> {
216223
Ok(self.repository.head()?.target().unwrap())
217224
}

0 commit comments

Comments
 (0)