diff --git a/gitoxide-core/src/repository/mod.rs b/gitoxide-core/src/repository/mod.rs index cf46b86765e..fbd0b8f6ac0 100644 --- a/gitoxide-core/src/repository/mod.rs +++ b/gitoxide-core/src/repository/mod.rs @@ -12,6 +12,8 @@ pub mod tree; pub mod commit; +pub mod revision; + pub mod verify; pub mod odb; diff --git a/gitoxide-core/src/repository/revision/explain.rs b/gitoxide-core/src/repository/revision/explain.rs new file mode 100644 index 00000000000..3ab84fe9c49 --- /dev/null +++ b/gitoxide-core/src/repository/revision/explain.rs @@ -0,0 +1,11 @@ +use git_repository as git; +use std::ffi::OsString; + +pub fn explain( + _repo: git::Repository, + _spec: OsString, + mut _out: impl std::io::Write, + mut _err: impl std::io::Write, +) -> anyhow::Result<()> { + Ok(()) +} diff --git a/gitoxide-core/src/repository/revision/mod.rs b/gitoxide-core/src/repository/revision/mod.rs new file mode 100644 index 00000000000..5e1065cbb34 --- /dev/null +++ b/gitoxide-core/src/repository/revision/mod.rs @@ -0,0 +1,2 @@ +mod explain; +pub use explain::explain; diff --git a/src/plumbing/main.rs b/src/plumbing/main.rs index df1e92b8380..51ff671ccfd 100644 --- a/src/plumbing/main.rs +++ b/src/plumbing/main.rs @@ -161,7 +161,16 @@ pub fn main() -> Result<()> { let repository = git::ThreadSafeRepository::discover(repository)?; match cmd { repo::Subcommands::Revision { cmd } => match cmd { - repo::revision::Subcommands::Explain { spec: _ } => todo!("describe spec"), + repo::revision::Subcommands::Explain { spec } => prepare_and_run( + "repository-commit-describe", + verbose, + progress, + progress_keep_open, + None, + move |_progress, out, err| { + core::repository::revision::explain(repository.into(), spec, out, err) + }, + ), }, repo::Subcommands::Commit { cmd } => match cmd { repo::commit::Subcommands::Describe {