@@ -180,7 +180,32 @@ static void gc_config(void)
180
180
git_config (git_default_config , NULL );
181
181
}
182
182
183
- struct maintenance_run_opts ;
183
+ enum schedule_priority {
184
+ SCHEDULE_NONE = 0 ,
185
+ SCHEDULE_WEEKLY = 1 ,
186
+ SCHEDULE_DAILY = 2 ,
187
+ SCHEDULE_HOURLY = 3 ,
188
+ };
189
+
190
+ static enum schedule_priority parse_schedule (const char * value )
191
+ {
192
+ if (!value )
193
+ return SCHEDULE_NONE ;
194
+ if (!strcasecmp (value , "hourly" ))
195
+ return SCHEDULE_HOURLY ;
196
+ if (!strcasecmp (value , "daily" ))
197
+ return SCHEDULE_DAILY ;
198
+ if (!strcasecmp (value , "weekly" ))
199
+ return SCHEDULE_WEEKLY ;
200
+ return SCHEDULE_NONE ;
201
+ }
202
+
203
+ struct maintenance_run_opts {
204
+ int auto_flag ;
205
+ int quiet ;
206
+ enum schedule_priority schedule ;
207
+ };
208
+
184
209
static int maintenance_task_pack_refs (MAYBE_UNUSED struct maintenance_run_opts * opts )
185
210
{
186
211
struct child_process cmd = CHILD_PROCESS_INIT ;
@@ -773,26 +798,6 @@ static const char *const builtin_maintenance_run_usage[] = {
773
798
NULL
774
799
};
775
800
776
- enum schedule_priority {
777
- SCHEDULE_NONE = 0 ,
778
- SCHEDULE_WEEKLY = 1 ,
779
- SCHEDULE_DAILY = 2 ,
780
- SCHEDULE_HOURLY = 3 ,
781
- };
782
-
783
- static enum schedule_priority parse_schedule (const char * value )
784
- {
785
- if (!value )
786
- return SCHEDULE_NONE ;
787
- if (!strcasecmp (value , "hourly" ))
788
- return SCHEDULE_HOURLY ;
789
- if (!strcasecmp (value , "daily" ))
790
- return SCHEDULE_DAILY ;
791
- if (!strcasecmp (value , "weekly" ))
792
- return SCHEDULE_WEEKLY ;
793
- return SCHEDULE_NONE ;
794
- }
795
-
796
801
static int maintenance_opt_schedule (const struct option * opt , const char * arg ,
797
802
int unset )
798
803
{
@@ -809,12 +814,6 @@ static int maintenance_opt_schedule(const struct option *opt, const char *arg,
809
814
return 0 ;
810
815
}
811
816
812
- struct maintenance_run_opts {
813
- int auto_flag ;
814
- int quiet ;
815
- enum schedule_priority schedule ;
816
- };
817
-
818
817
/* Remember to update object flag allocation in object.h */
819
818
#define SEEN (1u<<0)
820
819
0 commit comments