Re: [PATCHv10 01/10] receive-pack.c: shorten the execute_commands loop over all commands

2015-01-05 Thread Jonathan Nieder
Stefan Beller wrote: > On Mon, Jan 5, 2015 at 12:22 PM, Jonathan Nieder wrote: >> Stefan Beller wrote: >>> --- a/builtin/receive-pack.c >>> +++ b/builtin/receive-pack.c >> [...] >>> @@ -1077,27 +1100,15 @@ static void execute_commands(struct command >>> *commands, >> [...] >>> + if (shallow_

Re: [PATCHv10 01/10] receive-pack.c: shorten the execute_commands loop over all commands

2015-01-05 Thread Stefan Beller
On Mon, Jan 5, 2015 at 12:22 PM, Jonathan Nieder wrote: > Stefan Beller wrote: > >> --- a/builtin/receive-pack.c >> +++ b/builtin/receive-pack.c > [...] >> @@ -1077,27 +1100,15 @@ static void execute_commands(struct command >> *commands, > [...] >> + if (shallow_update) >> + assur

Re: [PATCHv10 01/10] receive-pack.c: shorten the execute_commands loop over all commands

2015-01-05 Thread Jonathan Nieder
Stefan Beller wrote: > --- a/builtin/receive-pack.c > +++ b/builtin/receive-pack.c [...] > @@ -1077,27 +1100,15 @@ static void execute_commands(struct command *commands, [...] > + if (shallow_update) > + assure_connectivity_checked(commands, si); Looking at this code alone, it see

[PATCHv10 01/10] receive-pack.c: shorten the execute_commands loop over all commands

2015-01-05 Thread Stefan Beller
Make the main "execute_commands" loop in receive-pack easier to read by splitting out some steps into helper functions. The new helper 'should_process_cmd' checks if a ref update is unnecessary, whether due to an error having occurred or for another reason. The helper 'assure_connectivity_checked'