@@ -678,7 +678,8 @@ static enum bisect_error bisect_auto_next(struct bisect_terms *terms, const char
678
678
return bisect_next (terms , prefix );
679
679
}
680
680
681
- static enum bisect_error bisect_start (struct bisect_terms * terms , const char * * argv , int argc )
681
+ static enum bisect_error bisect_start (struct bisect_terms * terms , int argc ,
682
+ const char * * argv )
682
683
{
683
684
int no_checkout = 0 ;
684
685
int first_parent_only = 0 ;
@@ -908,13 +909,13 @@ static int bisect_autostart(struct bisect_terms *terms)
908
909
yesno = git_prompt (_ ("Do you want me to do it for you "
909
910
"[Y/n]? " ), PROMPT_ECHO );
910
911
res = tolower (* yesno ) == 'n' ?
911
- -1 : bisect_start (terms , empty_strvec , 0 );
912
+ -1 : bisect_start (terms , 0 , empty_strvec );
912
913
913
914
return res ;
914
915
}
915
916
916
- static enum bisect_error bisect_state (struct bisect_terms * terms , const char * * argv ,
917
- int argc )
917
+ static enum bisect_error bisect_state (struct bisect_terms * terms , int argc ,
918
+ const char * * argv )
918
919
{
919
920
const char * state ;
920
921
int i , verify_expected = 1 ;
@@ -1033,7 +1034,7 @@ static int process_replay_line(struct bisect_terms *terms, struct strbuf *line)
1033
1034
struct strvec argv = STRVEC_INIT ;
1034
1035
int res ;
1035
1036
sq_dequote_to_strvec (rev , & argv );
1036
- res = bisect_start (terms , argv .v , argv .nr );
1037
+ res = bisect_start (terms , argv .nr , argv .v );
1037
1038
strvec_clear (& argv );
1038
1039
return res ;
1039
1040
}
@@ -1083,7 +1084,8 @@ static enum bisect_error bisect_replay(struct bisect_terms *terms, const char *f
1083
1084
return bisect_auto_next (terms , NULL );
1084
1085
}
1085
1086
1086
- static enum bisect_error bisect_skip (struct bisect_terms * terms , const char * * argv , int argc )
1087
+ static enum bisect_error bisect_skip (struct bisect_terms * terms , int argc ,
1088
+ const char * * argv )
1087
1089
{
1088
1090
int i ;
1089
1091
enum bisect_error res ;
@@ -1113,13 +1115,14 @@ static enum bisect_error bisect_skip(struct bisect_terms *terms, const char **ar
1113
1115
strvec_push (& argv_state , argv [i ]);
1114
1116
}
1115
1117
}
1116
- res = bisect_state (terms , argv_state .v , argv_state .nr );
1118
+ res = bisect_state (terms , argv_state .nr , argv_state .v );
1117
1119
1118
1120
strvec_clear (& argv_state );
1119
1121
return res ;
1120
1122
}
1121
1123
1122
- static int bisect_visualize (struct bisect_terms * terms , const char * * argv , int argc )
1124
+ static int bisect_visualize (struct bisect_terms * terms , int argc ,
1125
+ const char * * argv )
1123
1126
{
1124
1127
struct child_process cmd = CHILD_PROCESS_INIT ;
1125
1128
struct strbuf sb = STRBUF_INIT ;
@@ -1202,7 +1205,7 @@ static int verify_good(const struct bisect_terms *terms, const char *command)
1202
1205
return rc ;
1203
1206
}
1204
1207
1205
- static int bisect_run (struct bisect_terms * terms , const char * * argv , int argc )
1208
+ static int bisect_run (struct bisect_terms * terms , int argc , const char * * argv )
1206
1209
{
1207
1210
int res = BISECT_OK ;
1208
1211
struct strbuf command = STRBUF_INIT ;
@@ -1271,7 +1274,7 @@ static int bisect_run(struct bisect_terms *terms, const char **argv, int argc)
1271
1274
saved_stdout = dup (1 );
1272
1275
dup2 (temporary_stdout_fd , 1 );
1273
1276
1274
- res = bisect_state (terms , & new_state , 1 );
1277
+ res = bisect_state (terms , 1 , & new_state );
1275
1278
1276
1279
fflush (stdout );
1277
1280
dup2 (saved_stdout , 1 );
@@ -1328,7 +1331,7 @@ static int cmd_bisect__start(int argc, const char **argv, const char *prefix UNU
1328
1331
struct bisect_terms terms = { 0 };
1329
1332
1330
1333
set_terms (& terms , "bad" , "good" );
1331
- res = bisect_start (& terms , argv , argc );
1334
+ res = bisect_start (& terms , argc , argv );
1332
1335
free_terms (& terms );
1333
1336
return res ;
1334
1337
}
@@ -1372,7 +1375,7 @@ static int cmd_bisect__skip(int argc, const char **argv, const char *prefix UNUS
1372
1375
1373
1376
set_terms (& terms , "bad" , "good" );
1374
1377
get_terms (& terms );
1375
- res = bisect_skip (& terms , argv , argc );
1378
+ res = bisect_skip (& terms , argc , argv );
1376
1379
free_terms (& terms );
1377
1380
return res ;
1378
1381
}
@@ -1383,7 +1386,7 @@ static int cmd_bisect__visualize(int argc, const char **argv, const char *prefix
1383
1386
struct bisect_terms terms = { 0 };
1384
1387
1385
1388
get_terms (& terms );
1386
- res = bisect_visualize (& terms , argv , argc );
1389
+ res = bisect_visualize (& terms , argc , argv );
1387
1390
free_terms (& terms );
1388
1391
return res ;
1389
1392
}
@@ -1396,7 +1399,7 @@ static int cmd_bisect__run(int argc, const char **argv, const char *prefix UNUSE
1396
1399
if (!argc )
1397
1400
return error (_ ("'%s' failed: no command provided." ), "git bisect run" );
1398
1401
get_terms (& terms );
1399
- res = bisect_run (& terms , argv , argc );
1402
+ res = bisect_run (& terms , argc , argv );
1400
1403
free_terms (& terms );
1401
1404
return res ;
1402
1405
}
@@ -1432,7 +1435,7 @@ int cmd_bisect(int argc, const char **argv, const char *prefix)
1432
1435
if (check_and_set_terms (& terms , argv [0 ]))
1433
1436
usage_msg_optf (_ ("unknown command: '%s'" ), git_bisect_usage ,
1434
1437
options , argv [0 ]);
1435
- res = bisect_state (& terms , argv , argc );
1438
+ res = bisect_state (& terms , argc , argv );
1436
1439
free_terms (& terms );
1437
1440
} else {
1438
1441
argc -- ;
0 commit comments