diff --git a/gitoxide-core/src/lib.rs b/gitoxide-core/src/lib.rs index 838be4c764a..db644c42b9d 100644 --- a/gitoxide-core/src/lib.rs +++ b/gitoxide-core/src/lib.rs @@ -65,7 +65,6 @@ impl FromStr for OutputFormat { pub mod net; -pub mod commitgraph; #[cfg(feature = "estimate-hours")] pub mod hours; pub mod index; diff --git a/gitoxide-core/src/commitgraph/list.rs b/gitoxide-core/src/repository/commitgraph/list.rs similarity index 100% rename from gitoxide-core/src/commitgraph/list.rs rename to gitoxide-core/src/repository/commitgraph/list.rs diff --git a/gitoxide-core/src/commitgraph/mod.rs b/gitoxide-core/src/repository/commitgraph/mod.rs similarity index 100% rename from gitoxide-core/src/commitgraph/mod.rs rename to gitoxide-core/src/repository/commitgraph/mod.rs diff --git a/gitoxide-core/src/commitgraph/verify.rs b/gitoxide-core/src/repository/commitgraph/verify.rs similarity index 97% rename from gitoxide-core/src/commitgraph/verify.rs rename to gitoxide-core/src/repository/commitgraph/verify.rs index 4f4b8488083..20e4a012047 100644 --- a/gitoxide-core/src/commitgraph/verify.rs +++ b/gitoxide-core/src/repository/commitgraph/verify.rs @@ -12,7 +12,7 @@ pub struct Context { pub(crate) mod function { use std::io; - use crate::commitgraph::verify::Context; + use crate::repository::commitgraph::verify::Context; use crate::OutputFormat; use anyhow::{Context as AnyhowContext, Result}; diff --git a/gitoxide-core/src/repository/mod.rs b/gitoxide-core/src/repository/mod.rs index 7bac97dca1a..d373d62339d 100644 --- a/gitoxide-core/src/repository/mod.rs +++ b/gitoxide-core/src/repository/mod.rs @@ -25,6 +25,7 @@ pub mod fetch; pub use clone::function::clone; #[cfg(feature = "blocking-client")] pub use fetch::function::fetch; +pub mod commitgraph; pub mod index; pub mod mailmap; pub mod odb; diff --git a/src/plumbing/main.rs b/src/plumbing/main.rs index e3be8157ab5..1f928d3039c 100644 --- a/src/plumbing/main.rs +++ b/src/plumbing/main.rs @@ -136,7 +136,9 @@ pub fn main() -> Result<()> { progress, progress_keep_open, None, - move |_progress, out, _err| core::commitgraph::list(repository(Mode::Lenient)?, spec, out, format), + move |_progress, out, _err| { + core::repository::commitgraph::list(repository(Mode::Lenient)?, spec, out, format) + }, ) .map(|_| ()), commitgraph::Subcommands::Verify { statistics } => prepare_and_run( @@ -147,9 +149,9 @@ pub fn main() -> Result<()> { None, move |_progress, out, err| { let output_statistics = if statistics { Some(format) } else { None }; - core::commitgraph::verify( + core::repository::commitgraph::verify( repository(Mode::Lenient)?, - core::commitgraph::verify::Context { + core::repository::commitgraph::verify::Context { err, out, output_statistics,