@@ -63,41 +63,47 @@ func mainImplementation() error {
63
63
pflag .BoolVar (& processBranches , "branches" , false , "process all branches" )
64
64
pflag .BoolVar (& processTags , "tags" , false , "process all tags" )
65
65
pflag .BoolVar (& processRemotes , "remotes" , false , "process all remote-tracking branches" )
66
+
67
+ pflag .Var (
68
+ sizes .NewThresholdFlagValue (& threshold , 0 ),
69
+ "verbose" , "report all statistics, whether concerning or not" ,
70
+ )
71
+ pflag .Lookup ("verbose" ).NoOptDefVal = "true"
72
+
66
73
pflag .Var (
67
74
& threshold , "threshold" ,
68
75
"minimum level of concern (i.e., number of stars) that should be\n " +
69
76
" reported" ,
70
77
)
78
+
71
79
pflag .Var (
72
80
sizes .NewThresholdFlagValue (& threshold , 30 ),
73
81
"critical" , "only report critical statistics" ,
74
82
)
75
83
pflag .Lookup ("critical" ).NoOptDefVal = "true"
76
- pflag .Var (
77
- sizes .NewThresholdFlagValue (& threshold , 0 ),
78
- "verbose" , "report all statistics, whether concerning or not" ,
79
- )
80
- pflag .Lookup ("verbose" ).NoOptDefVal = "true"
84
+
81
85
pflag .Var (
82
86
& nameStyle , "names" ,
83
87
"display names of large objects in the specified `style`:\n " +
84
88
" --names=none omit footnotes entirely\n " +
85
89
" --names=hash show only the SHA-1s of objects\n " +
86
90
" --names=full show full names" ,
87
91
)
92
+
88
93
pflag .BoolVarP (& jsonOutput , "json" , "j" , false , "output results in JSON format" )
89
94
90
95
atty , err := isatty .Isatty (os .Stderr .Fd ())
91
96
if err != nil {
92
97
atty = false
93
98
}
94
-
95
99
pflag .BoolVar (& progress , "progress" , atty , "report progress to stderr" )
96
100
pflag .Var (& NegatedBoolValue {& progress }, "no-progress" , "suppress progress output" )
97
101
pflag .Lookup ("no-progress" ).NoOptDefVal = "true"
98
102
99
103
pflag .StringVar (& cpuprofile , "cpuprofile" , "" , "write cpu profile to file" )
100
104
105
+ pflag .CommandLine .SortFlags = false
106
+
101
107
pflag .Parse ()
102
108
103
109
if cpuprofile != "" {
0 commit comments