Unified · Split
| @@ -12,6 +12,8 @@ pub mod tree; · 11 unmodified lines | |||
| 12 | 12 | ||
| 13 | pub mod commit; | 13 | pub mod commit; |
| 14 | 14 | ||
| 15 | pub mod revision; | ||
| 16 | |||
| 15 | pub mod verify; | 17 | pub mod verify; |
| 16 | 18 | ||
| 17 | pub mod odb; | 19 | pub mod odb; |
| @@ -0,0 +1,11 @@ | |||
| 1 | use git_repository as git; | ||
| 2 | use std::ffi::OsString; | ||
| 3 | |||
| 4 | pub fn explain( | ||
| 5 | _repo: git::Repository, | ||
| 6 | _spec: OsString, | ||
| 7 | mut _out: impl std::io::Write, | ||
| 8 | mut _err: impl std::io::Write, | ||
| 9 | ) -> anyhow::Result<()> { | ||
| 10 | Ok(()) | ||
| 11 | } | ||
| @@ -0,0 +1,2 @@ | |||
| 1 | mod explain; | ||
| 2 | pub use explain::explain; | ||
| @@ -161,7 +161,16 @@ pub fn main() -> Result<()> { · 160 unmodified lines | |||
| 161 | let repository = git::ThreadSafeRepository::discover(repository)?; | 161 | let repository = git::ThreadSafeRepository::discover(repository)?; |
| 162 | match cmd { | 162 | match cmd { |
| 163 | repo::Subcommands::Revision { cmd } => match cmd { | 163 | repo::Subcommands::Revision { cmd } => match cmd { |
| 164 | repo::revision::Subcommands::Explain { spec: _ } => todo!("describe spec"), | 164 | repo::revision::Subcommands::Explain { spec } => prepare_and_run( |
| 165 | "repository-commit-describe", | ||
| 166 | verbose, | ||
| 167 | progress, | ||
| 168 | progress_keep_open, | ||
| 169 | None, | ||
| 170 | move |_progress, out, err| { | ||
| 171 | core::repository::revision::explain(repository.into(), spec, out, err) | ||
| 172 | }, | ||
| 173 | ), | ||
| 165 | }, | 174 | }, |
| 166 | repo::Subcommands::Commit { cmd } => match cmd { | 175 | repo::Subcommands::Commit { cmd } => match cmd { |
| 167 | repo::commit::Subcommands::Describe { | 176 | repo::commit::Subcommands::Describe { |