Skip to content

Commit ac7d99a

Browse files
committed
move 'verify' up one level (#331)
1 parent c9c78e8 commit ac7d99a

File tree

2 files changed

+34
-34
lines changed

2 files changed

+34
-34
lines changed

Diff for: src/plumbing/main.rs

+29-29
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,35 @@ pub fn main() -> Result<()> {
474474
},
475475
},
476476
},
477+
Subcommands::Verify {
478+
args:
479+
free::pack::VerifyOptions {
480+
statistics,
481+
algorithm,
482+
decode,
483+
re_encode,
484+
},
485+
} => prepare_and_run(
486+
"repository-verify",
487+
verbose,
488+
progress,
489+
progress_keep_open,
490+
core::repository::verify::PROGRESS_RANGE,
491+
move |progress, out, _err| {
492+
core::repository::verify::integrity(
493+
repository()?.into(),
494+
out,
495+
progress,
496+
&should_interrupt,
497+
core::repository::verify::Context {
498+
output_statistics: statistics.then(|| format),
499+
algorithm,
500+
verify_mode: verify_mode(decode, re_encode),
501+
thread_limit,
502+
},
503+
)
504+
},
505+
),
477506
Subcommands::Revision { cmd } => match cmd {
478507
revision::Subcommands::Explain { spec } => prepare_and_run(
479508
"repository-commit-describe",
@@ -625,35 +654,6 @@ pub fn main() -> Result<()> {
625654
},
626655
),
627656
},
628-
repo::Subcommands::Verify {
629-
args:
630-
free::pack::VerifyOptions {
631-
statistics,
632-
algorithm,
633-
decode,
634-
re_encode,
635-
},
636-
} => prepare_and_run(
637-
"repository-verify",
638-
verbose,
639-
progress,
640-
progress_keep_open,
641-
core::repository::verify::PROGRESS_RANGE,
642-
move |progress, out, _err| {
643-
core::repository::verify::integrity(
644-
repository()?.into(),
645-
out,
646-
progress,
647-
&should_interrupt,
648-
core::repository::verify::Context {
649-
output_statistics: statistics.then(|| format),
650-
algorithm,
651-
verify_mode: verify_mode(decode, re_encode),
652-
thread_limit,
653-
},
654-
)
655-
},
656-
),
657657
},
658658
}?;
659659
Ok(())

Diff for: src/plumbing/options.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ pub struct Args {
5151

5252
#[derive(Debug, clap::Subcommand)]
5353
pub enum Subcommands {
54+
/// Verify the integrity of the entire repository
55+
Verify {
56+
#[clap(flatten)]
57+
args: free::pack::VerifyOptions,
58+
},
5459
/// Query and obtain information about revisions.
5560
Revision {
5661
#[clap(subcommand)]
@@ -483,11 +488,6 @@ pub mod repo {
483488
#[derive(Debug, clap::Subcommand)]
484489
#[clap(visible_alias = "repo")]
485490
pub enum Subcommands {
486-
/// Verify the integrity of the entire repository
487-
Verify {
488-
#[clap(flatten)]
489-
args: super::free::pack::VerifyOptions,
490-
},
491491
/// Interact with commit objects.
492492
Commit {
493493
#[clap(subcommand)]

0 commit comments

Comments
 (0)