Re: [PATCH 09/16] update submodules: add scheduling to update submodules

2016-11-17 Thread Stefan Beller
On Tue, Nov 15, 2016 at 4:02 PM, Brandon Williams wrote: > On 11/15, Stefan Beller wrote: >> + >> + child_process_clear(&cp); >> + return 0; >> +} > > If run command is successful then it handles the clearing of the child > process struct, correct? Is there a negative to having all the ex

RE: [PATCH 09/16] update submodules: add scheduling to update submodules

2016-11-15 Thread David Turner
> -Original Message- > From: Brandon Williams [mailto:bmw...@google.com] > > +struct scheduled_submodules_update_type { > > + const char *path; > > + const struct object_id *oid; > > + /* > > +* Do we need to perform a complete checkout or just incremental > > +* update? > > +

Re: [PATCH 09/16] update submodules: add scheduling to update submodules

2016-11-15 Thread Brandon Williams
On 11/15, Stefan Beller wrote: > +static int update_submodule(const char *path, const struct object_id *oid, > + int force, int is_new) > +{ > + const char *git_dir; > + struct child_process cp = CHILD_PROCESS_INIT; > + const struct submodule *sub = submodule_fro

[PATCH 09/16] update submodules: add scheduling to update submodules

2016-11-15 Thread Stefan Beller
The walker of a tree is only expected to call `schedule_submodule_for_update` and once done, to run `update_submodules`. This avoids directory/file conflicts and later we can parallelize all submodule actions if needed. Signed-off-by: Stefan Beller --- submodule.c | 117 +