Re: [PATCH] fetch-pack: do not take shallow lock unnecessarily

2019-01-14 Thread Jonathan Tan
> In other parts of the code we often have an early exit instead of > setting a variable and reacting to that in the end, i.e. what > do you think about: > > static void receive_shallow_info(struct fetch_pack_args *args, > struct packet_reader *reader) > { > process_section_header(reader,

Re: [PATCH] fetch-pack: do not take shallow lock unnecessarily

2019-01-10 Thread Stefan Beller
On Thu, Jan 10, 2019 at 11:36 AM Jonathan Tan wrote: > > When fetching using protocol v2, the remote may send a "shallow-info" > section if the client is shallow. If so, Git as the client currently > takes the shallow file lock, even if the "shallow-info" section is > empty. > > This is not a prob

[PATCH] fetch-pack: do not take shallow lock unnecessarily

2019-01-10 Thread Jonathan Tan
When fetching using protocol v2, the remote may send a "shallow-info" section if the client is shallow. If so, Git as the client currently takes the shallow file lock, even if the "shallow-info" section is empty. This is not a problem except that Git does not support taking the shallow file lock a