@@ -21,6 +21,20 @@ mod options {
2121 /// If unset, or the value is 0, there is no limit and all logical cores can be used.
2222 pub threads : Option < usize > ,
2323
24+ /// Display verbose messages and progress information
25+ #[ structopt( long, short = "v" ) ]
26+ pub verbose : bool ,
27+
28+ /// Bring up a terminal user interface displaying progress visually
29+ #[ structopt( long, conflicts_with( "verbose" ) ) ]
30+ pub progress : bool ,
31+
32+ /// The progress TUI will stay up even though the work is already completed.
33+ ///
34+ /// Use this to be able to read progress messages or additional information visible in the TUI log pane.
35+ #[ structopt( long, conflicts_with( "verbose" ) , requires( "progress" ) ) ]
36+ pub progress_keep_open : bool ,
37+
2438 #[ structopt( subcommand) ]
2539 pub cmd : Subcommands ,
2640 }
@@ -32,20 +46,6 @@ mod options {
3246 /// This command can also be used to stream packs to standard input or to repair partial packs.
3347 #[ structopt( setting = AppSettings :: ColoredHelp ) ]
3448 IndexFromPack {
35- /// Display verbose messages and progress information
36- #[ structopt( long, short = "v" ) ]
37- verbose : bool ,
38-
39- /// Bring up a terminal user interface displaying progress visually
40- #[ structopt( long, conflicts_with( "verbose" ) ) ]
41- progress : bool ,
42-
43- /// The progress TUI will stay up even though the work is already completed.
44- ///
45- /// Use this to be able to read progress messages or additional information visible in the TUI log pane.
46- #[ structopt( long, conflicts_with( "verbose" ) , requires( "progress" ) ) ]
47- progress_keep_open : bool ,
48-
4949 /// Specify how to iterate the pack, defaults to 'verify'
5050 ///
5151 /// Valid values are
@@ -105,20 +105,6 @@ mod options {
105105 #[ structopt( long) ]
106106 sink_compress : bool ,
107107
108- /// Display verbose messages and progress information
109- #[ structopt( long, short = "v" ) ]
110- verbose : bool ,
111-
112- /// Bring up a terminal user interface displaying progress visually
113- #[ structopt( long, conflicts_with( "verbose" ) ) ]
114- progress : bool ,
115-
116- /// The progress TUI will stay up even though the work is already completed.
117- ///
118- /// Use this to be able to read progress messages or additional information visible in the TUI log pane.
119- #[ structopt( long, conflicts_with( "verbose" ) , requires( "progress" ) ) ]
120- progress_keep_open : bool ,
121-
122108 /// The '.pack' or '.idx' file to explode into loose objects
123109 #[ structopt( parse( from_os_str) ) ]
124110 pack_path : PathBuf ,
@@ -151,14 +137,6 @@ mod options {
151137 ) ]
152138 algorithm : core:: pack:: verify:: Algorithm ,
153139
154- /// Display verbose messages and progress information
155- #[ structopt( long, short = "v" ) ]
156- verbose : bool ,
157-
158- /// Bring up a terminal user interface displaying progress visually
159- #[ structopt( long, conflicts_with( "verbose" ) ) ]
160- progress : bool ,
161-
162140 #[ structopt( long, conflicts_with( "re-encode" ) ) ]
163141 /// Decode and parse tags, commits and trees to validate their correctness beyond hashing correctly.
164142 ///
@@ -175,12 +153,6 @@ mod options {
175153 /// owned objects, causing plenty of allocation to occour.
176154 re_encode : bool ,
177155
178- /// The progress TUI will stay up even though the work is already completed.
179- ///
180- /// Use this to be able to read progress messages or additional information visible in the TUI log pane.
181- #[ structopt( long, conflicts_with( "verbose" ) , requires( "progress" ) ) ]
182- progress_keep_open : bool ,
183-
184156 /// The '.pack' or '.idx' file whose checksum to validate.
185157 #[ structopt( parse( from_os_str) ) ]
186158 path : PathBuf ,
@@ -292,14 +264,15 @@ fn prepare_and_run<T: Send + 'static>(
292264pub fn main ( ) -> Result < ( ) > {
293265 let args = Args :: from_args ( ) ;
294266 let thread_limit = args. threads ;
267+ let verbose = args. verbose ;
268+ let progress = args. progress ;
269+ let progress_keep_open = args. progress_keep_open ;
270+
295271 match args. cmd {
296272 Subcommands :: IndexFromPack {
297- verbose,
298273 iteration_mode,
299274 pack_path,
300275 directory,
301- progress,
302- progress_keep_open,
303276 } => prepare_and_run (
304277 "index-from-pack" ,
305278 verbose,
@@ -318,10 +291,7 @@ pub fn main() -> Result<()> {
318291 } ,
319292 ) ,
320293 Subcommands :: PackExplode {
321- verbose,
322294 check,
323- progress,
324- progress_keep_open,
325295 sink_compress,
326296 delete_pack,
327297 pack_path,
@@ -350,12 +320,9 @@ pub fn main() -> Result<()> {
350320 Subcommands :: PackVerify {
351321 path,
352322 algorithm,
353- verbose,
354- progress,
355323 format,
356324 decode,
357325 re_encode,
358- progress_keep_open,
359326 statistics,
360327 } => prepare_and_run (
361328 "pack-verify" ,
0 commit comments