@@ -81,8 +81,11 @@ pub enum Subcommands {
81
81
#[ clap( subcommand) ]
82
82
cmd : mailmap:: Subcommands ,
83
83
} ,
84
- /// Subcommands for interacting with entire git repositories
85
- Repository ( repo:: Platform ) ,
84
+ /// Interact with the exclude files like .gitignore.
85
+ Exclude {
86
+ #[ clap( subcommand) ]
87
+ cmd : exclude:: Subcommands ,
88
+ } ,
86
89
/// Subcommands that need no git repository to run.
87
90
#[ clap( subcommand) ]
88
91
Free ( free:: Subcommands ) ,
@@ -580,48 +583,28 @@ pub mod free {
580
583
}
581
584
}
582
585
583
- ///
584
- pub mod repo {
585
- #[ derive( Debug , clap:: Parser ) ]
586
- pub struct Platform {
587
- /// Subcommands
588
- #[ clap( subcommand) ]
589
- pub cmd : Subcommands ,
590
- }
586
+ pub mod exclude {
587
+ use std:: ffi:: OsString ;
588
+
589
+ use git_repository as git;
591
590
592
591
#[ derive( Debug , clap:: Subcommand ) ]
593
- #[ clap( visible_alias = "repo" ) ]
594
592
pub enum Subcommands {
595
- /// Interact with the exclude files like .gitignore.
596
- Exclude {
597
- #[ clap( subcommand) ]
598
- cmd : exclude:: Subcommands ,
593
+ /// Check if path-specs are excluded and print the result similar to `git check-ignore`.
594
+ Query {
595
+ /// Show actual ignore patterns instead of un-excluding an entry.
596
+ ///
597
+ /// That way one can understand why an entry might not be excluded.
598
+ #[ clap( long, short = 'i' ) ]
599
+ show_ignore_patterns : bool ,
600
+ /// Additional patterns to use for exclusions. They have the highest priority.
601
+ ///
602
+ /// Useful for undoing previous patterns using the '!' prefix.
603
+ #[ clap( long, short = 'p' ) ]
604
+ patterns : Vec < OsString > ,
605
+ /// The git path specifications to check for exclusion, or unset to read from stdin one per line.
606
+ #[ clap( parse( try_from_os_str = std:: convert:: TryFrom :: try_from) ) ]
607
+ pathspecs : Vec < git:: path:: Spec > ,
599
608
} ,
600
609
}
601
-
602
- pub mod exclude {
603
- use std:: ffi:: OsString ;
604
-
605
- use git_repository as git;
606
-
607
- #[ derive( Debug , clap:: Subcommand ) ]
608
- pub enum Subcommands {
609
- /// Check if path-specs are excluded and print the result similar to `git check-ignore`.
610
- Query {
611
- /// Show actual ignore patterns instead of un-excluding an entry.
612
- ///
613
- /// That way one can understand why an entry might not be excluded.
614
- #[ clap( long, short = 'i' ) ]
615
- show_ignore_patterns : bool ,
616
- /// Additional patterns to use for exclusions. They have the highest priority.
617
- ///
618
- /// Useful for undoing previous patterns using the '!' prefix.
619
- #[ clap( long, short = 'p' ) ]
620
- patterns : Vec < OsString > ,
621
- /// The git path specifications to check for exclusion, or unset to read from stdin one per line.
622
- #[ clap( parse( try_from_os_str = std:: convert:: TryFrom :: try_from) ) ]
623
- pathspecs : Vec < git:: path:: Spec > ,
624
- } ,
625
- }
626
- }
627
610
}
0 commit comments