Skip to content

Commit

Permalink
move 'verify' up one level (#331)
Browse files Browse the repository at this point in the history
  • Loading branch information
Byron committed Jul 22, 2022
1 parent c9c78e8 commit ac7d99a
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 34 deletions.
58 changes: 29 additions & 29 deletions src/plumbing/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,35 @@ pub fn main() -> Result<()> {
},
},
},
Subcommands::Verify {
args:
free::pack::VerifyOptions {
statistics,
algorithm,
decode,
re_encode,
},
} => prepare_and_run(
"repository-verify",
verbose,
progress,
progress_keep_open,
core::repository::verify::PROGRESS_RANGE,
move |progress, out, _err| {
core::repository::verify::integrity(
repository()?.into(),
out,
progress,
&should_interrupt,
core::repository::verify::Context {
output_statistics: statistics.then(|| format),
algorithm,
verify_mode: verify_mode(decode, re_encode),
thread_limit,
},
)
},
),
Subcommands::Revision { cmd } => match cmd {
revision::Subcommands::Explain { spec } => prepare_and_run(
"repository-commit-describe",
Expand Down Expand Up @@ -625,35 +654,6 @@ pub fn main() -> Result<()> {
},
),
},
repo::Subcommands::Verify {
args:
free::pack::VerifyOptions {
statistics,
algorithm,
decode,
re_encode,
},
} => prepare_and_run(
"repository-verify",
verbose,
progress,
progress_keep_open,
core::repository::verify::PROGRESS_RANGE,
move |progress, out, _err| {
core::repository::verify::integrity(
repository()?.into(),
out,
progress,
&should_interrupt,
core::repository::verify::Context {
output_statistics: statistics.then(|| format),
algorithm,
verify_mode: verify_mode(decode, re_encode),
thread_limit,
},
)
},
),
},
}?;
Ok(())
Expand Down
10 changes: 5 additions & 5 deletions src/plumbing/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ pub struct Args {

#[derive(Debug, clap::Subcommand)]
pub enum Subcommands {
/// Verify the integrity of the entire repository
Verify {
#[clap(flatten)]
args: free::pack::VerifyOptions,
},
/// Query and obtain information about revisions.
Revision {
#[clap(subcommand)]
Expand Down Expand Up @@ -483,11 +488,6 @@ pub mod repo {
#[derive(Debug, clap::Subcommand)]
#[clap(visible_alias = "repo")]
pub enum Subcommands {
/// Verify the integrity of the entire repository
Verify {
#[clap(flatten)]
args: super::free::pack::VerifyOptions,
},
/// Interact with commit objects.
Commit {
#[clap(subcommand)]
Expand Down

0 comments on commit ac7d99a

Please sign in to comment.