11use anyhow:: Result ;
22use gitoxide_core as core;
3- use std:: io:: { stderr, stdout} ;
43use structopt:: StructOpt ;
54
65mod options {
7- use std:: path:: PathBuf ;
8- use structopt:: clap:: AppSettings ;
9- use structopt:: StructOpt ;
6+ use structopt:: { clap:: AppSettings , StructOpt } ;
107
118 #[ derive( Debug , StructOpt ) ]
129 #[ structopt( about = "The git, simply swift" ) ]
@@ -17,28 +14,12 @@ mod options {
1714 pub cmd : Subcommands ,
1815 }
1916
20- /// Low-level commands that are not used every day
21- #[ derive( Debug , StructOpt ) ]
22- pub enum Plumbing {
23- /// Verify the integrity of a pack or index file
24- #[ structopt( setting = AppSettings :: ColoredHelp ) ]
25- VerifyPack {
26- /// The '.pack' or '.idx' file whose checksum to validate.
27- #[ structopt( parse( from_os_str) ) ]
28- path : PathBuf ,
29- } ,
30- }
31-
3217 #[ derive( Debug , StructOpt ) ]
3318 pub enum Subcommands {
3419 /// Initialize the repository in the current directory.
3520 #[ structopt( alias = "initialize" ) ]
3621 #[ structopt( setting = AppSettings :: ColoredHelp ) ]
3722 Init ,
38-
39- #[ structopt( alias = "p" ) ]
40- #[ structopt( setting = AppSettings :: ColoredHelp ) ]
41- Plumbing ( Plumbing ) ,
4223 }
4324}
4425
@@ -47,11 +28,6 @@ pub fn main() -> Result<()> {
4728 let args = Args :: from_args ( ) ;
4829 match args. cmd {
4930 Subcommands :: Init => core:: init ( ) ,
50- Subcommands :: Plumbing ( cmd) => match cmd {
51- Plumbing :: VerifyPack { path } => {
52- core:: verify_pack_or_pack_index ( path, stdout ( ) , stderr ( ) )
53- }
54- } ,
5531 } ?;
5632 Ok ( ( ) )
5733}
0 commit comments