Re: [WIP/PATCH 3/3] submodule: helper to run foreach in parallel

2015-08-21 Thread Stefan Beller
On Fri, Aug 21, 2015 at 12:23 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> +struct submodule_args { >> + const char *name; >> + const char *path; >> + const char *sha1; >> + const char *toplevel; >> + const char *prefix; >> + const char **cmd; >> + struct sub

Re: [WIP/PATCH 3/3] submodule: helper to run foreach in parallel

2015-08-21 Thread Junio C Hamano
Stefan Beller writes: > +struct submodule_args { > + const char *name; > + const char *path; > + const char *sha1; > + const char *toplevel; > + const char *prefix; > + const char **cmd; > + struct submodule_output *out; > + sem_t *mutex; > +}; I do not see what s

[WIP/PATCH 3/3] submodule: helper to run foreach in parallel

2015-08-20 Thread Stefan Beller
This runs a command on each submodule in parallel and should eventually replace `git submodule foreach`. There is a new option -j/--jobs (inspired by make) to specify the number of parallel threads. The jobs=1 case needs to be special cases to exactly replicate the current default behavior of `gi