Skip to content

Commit

Permalink
Add retrieve_commit_hash()
Browse files Browse the repository at this point in the history
  • Loading branch information
junha1 committed Dec 29, 2022
1 parent 50e8cd1 commit 7b5db8b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions repository/src/raw/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ pub trait RawRepository: Send + Sync + 'static {
where
Self: Sized;

/// Returns the full commit hash from the revision selection string.
///
/// See the [reference](https://git-scm.com/book/en/v2/Git-Tools-Revision-Selection).
async fn retrieve_commit_hash(&self, revision_selection: &str) -> Result<CommitHash, Error>;

// ----------------------
// Branch-related methods
// ----------------------
Expand Down Expand Up @@ -362,6 +367,10 @@ impl RawRepository for RawRepositoryImpl {
Ok(Self { inner })
}

async fn retrieve_commit_hash(&self, _revision_selection: &str) -> Result<CommitHash, Error> {
todo!()
}

async fn list_branches(&self) -> Result<Vec<Branch>, Error> {
helper_0(self, RawRepositoryImplInner::list_branches).await
}
Expand Down

0 comments on commit 7b5db8b

Please sign in to comment.