@@ -37,6 +37,7 @@ static int prune = -1; /* unspecified */
3737static int all , append , dry_run , force , keep , multiple , update_head_ok , verbosity ;
3838static int progress = -1 , recurse_submodules = RECURSE_SUBMODULES_DEFAULT ;
3939static int tags = TAGS_DEFAULT , unshallow , update_shallow ;
40+ static int max_children = 1 ;
4041static const char * depth ;
4142static const char * upload_pack ;
4243static struct strbuf default_rla = STRBUF_INIT ;
@@ -99,6 +100,8 @@ static struct option builtin_fetch_options[] = {
99100 N_ ("fetch all tags and associated objects" ), TAGS_SET ),
100101 OPT_SET_INT ('n' , NULL , & tags ,
101102 N_ ("do not fetch all tags (--no-tags)" ), TAGS_UNSET ),
103+ OPT_INTEGER ('j' , "jobs" , & max_children ,
104+ N_ ("number of submodules fetched in parallel" )),
102105 OPT_BOOL ('p' , "prune" , & prune ,
103106 N_ ("prune remote-tracking branches no longer on remote" )),
104107 { OPTION_CALLBACK , 0 , "recurse-submodules" , NULL , N_ ("on-demand" ),
@@ -1213,7 +1216,8 @@ int cmd_fetch(int argc, const char **argv, const char *prefix)
12131216 result = fetch_populated_submodules (& options ,
12141217 submodule_prefix ,
12151218 recurse_submodules ,
1216- verbosity < 0 );
1219+ verbosity < 0 ,
1220+ max_children );
12171221 argv_array_clear (& options );
12181222 }
12191223
0 commit comments