@@ -67,8 +67,8 @@ pub struct InfoCliOptions {
67
67
#[ arg( long, value_name = "NUM" ) ]
68
68
pub number_of_languages : Option < usize > ,
69
69
/// Maximum NUM of file churns to be shown
70
- #[ arg( long, default_value_t = 3usize , value_name = "NUM" ) ]
71
- pub number_of_file_churns : usize ,
70
+ #[ arg( long, value_name = "NUM" ) ]
71
+ pub number_of_file_churns : Option < usize > ,
72
72
/// Minimum NUM of commits from HEAD used to compute the churn summary
73
73
///
74
74
/// By default, the actual value is non-deterministic due to time-based computation
@@ -89,7 +89,7 @@ pub struct InfoCliOptions {
89
89
pub no_bots : Option < MyRegex > ,
90
90
/// Ignores merge commits
91
91
#[ arg( long) ]
92
- pub no_merges : bool ,
92
+ pub no_merges : Option < bool > ,
93
93
/// Show the email address of each author
94
94
#[ arg( long, short = 'E' ) ]
95
95
pub email : bool ,
@@ -101,7 +101,7 @@ pub struct InfoCliOptions {
101
101
pub hide_token : bool ,
102
102
/// Count hidden files and directories
103
103
#[ arg( long) ]
104
- pub include_hidden : bool ,
104
+ pub include_hidden : Option < bool > ,
105
105
/// Filters output by language type
106
106
#[ arg(
107
107
long,
@@ -147,7 +147,7 @@ pub struct AsciiCliOptions {
147
147
///
148
148
/// If set to auto: true color will be enabled if supported by the terminal
149
149
#[ arg( long, default_value = "auto" , value_name = "WHEN" , value_enum) ]
150
- pub true_color : When ,
150
+ pub true_color : Option < When > ,
151
151
}
152
152
153
153
#[ derive( Clone , Debug , Args , PartialEq , Eq ) ]
@@ -191,13 +191,13 @@ pub struct TextFormattingCliOptions {
191
191
pub text_colors : Vec < u8 > ,
192
192
/// Use ISO 8601 formatted timestamps
193
193
#[ arg( long, short = 'z' ) ]
194
- pub iso_time : bool ,
194
+ pub iso_time : Option < bool > ,
195
195
/// Which thousands SEPARATOR to use
196
- #[ arg( long, value_name = "SEPARATOR" , default_value = "plain" , value_enum) ]
197
- pub number_separator : NumberSeparator ,
196
+ #[ arg( long, value_name = "SEPARATOR" , value_enum) ]
197
+ pub number_separator : Option < NumberSeparator > ,
198
198
/// Turns off bold formatting
199
199
#[ arg( long) ]
200
- pub no_bold : bool ,
200
+ pub no_bold : Option < bool > ,
201
201
}
202
202
#[ derive( Clone , Debug , Args , PartialEq , Eq , Default ) ]
203
203
#[ command( next_help_heading = "VISUALS" ) ]
@@ -212,7 +212,7 @@ pub struct VisualsCliOptions {
212
212
///
213
213
/// Replaces language chips with Nerd Font icons
214
214
#[ arg( long) ]
215
- pub nerd_fonts : bool ,
215
+ pub nerd_fonts : Option < bool > ,
216
216
}
217
217
218
218
#[ derive( Clone , Debug , Args , PartialEq , Eq ) ]
@@ -270,7 +270,7 @@ impl Default for InfoCliOptions {
270
270
InfoCliOptions {
271
271
number_of_authors : Some ( 3 ) ,
272
272
number_of_languages : Some ( 6 ) ,
273
- number_of_file_churns : 3 ,
273
+ number_of_file_churns : Some ( 3 ) ,
274
274
churn_pool_size : Option :: default ( ) ,
275
275
exclude : Vec :: default ( ) ,
276
276
no_bots : Option :: default ( ) ,
@@ -291,7 +291,7 @@ impl Default for TextFormattingCliOptions {
291
291
TextFormattingCliOptions {
292
292
text_colors : Default :: default ( ) ,
293
293
iso_time : Default :: default ( ) ,
294
- number_separator : NumberSeparator :: Plain ,
294
+ number_separator : Some ( NumberSeparator :: Plain ) ,
295
295
no_bold : Default :: default ( ) ,
296
296
}
297
297
}
@@ -303,7 +303,7 @@ impl Default for AsciiCliOptions {
303
303
ascii_input : Option :: default ( ) ,
304
304
ascii_colors : Vec :: default ( ) ,
305
305
ascii_language : Option :: default ( ) ,
306
- true_color : When :: Auto ,
306
+ true_color : Some ( When :: Auto ) ,
307
307
}
308
308
}
309
309
}
@@ -418,7 +418,7 @@ mod test {
418
418
input : PathBuf :: from ( "/tmp/folder" ) ,
419
419
info : InfoCliOptions {
420
420
number_of_authors : 4 ,
421
- no_merges : true ,
421
+ no_merges : Some ( true ) ,
422
422
disabled_fields : vec ! [ InfoType :: Version , InfoType :: URL ] . into ( ) ,
423
423
..Default :: default ( )
424
424
} ,
0 commit comments