Re: [PATCH 2/2] fetch-pack: respect --no-update-shallow in v2

2019-03-26 Thread Jeff King
On Tue, Mar 26, 2019 at 10:37:06AM -0700, Jonathan Tan wrote: > > Perhaps it's worth passing down the shallows array we get from the > > caller of fetch_pack(). Something like the patch below (I think it is > > never NULL, which means in your patch 1 you can simplify the conditional > > for the BU

Re: [PATCH 2/2] fetch-pack: respect --no-update-shallow in v2

2019-03-26 Thread Jonathan Tan
> On Mon, Mar 25, 2019 at 01:43:23PM -0700, Jonathan Tan wrote: > > > In protocol v0, when sending "shallow" lines, the server distinguishes > > between lines caused by the remote repo being shallow and lines caused > > by client-specified depth settings. Unless "--update-shallow" is > > specified

Re: [PATCH 2/2] fetch-pack: respect --no-update-shallow in v2

2019-03-26 Thread Duy Nguyen
On Tue, Mar 26, 2019 at 10:18 PM Jeff King wrote: > > On Tue, Mar 26, 2019 at 05:14:11PM +0700, Duy Nguyen wrote: > > > > That seems like the best we can do without the protocol change. And even > > > if we adjust the protocol, we need some fallback behavior for existing > > > v2 servers, so this

Re: [PATCH 2/2] fetch-pack: respect --no-update-shallow in v2

2019-03-26 Thread Jeff King
On Tue, Mar 26, 2019 at 05:14:11PM +0700, Duy Nguyen wrote: > > That seems like the best we can do without the protocol change. And even > > if we adjust the protocol, we need some fallback behavior for existing > > v2 servers, so this is worth doing. > > Are people actually doing this (i.e. clon

Re: [PATCH 2/2] fetch-pack: respect --no-update-shallow in v2

2019-03-26 Thread Duy Nguyen
On Tue, Mar 26, 2019 at 12:20 PM Jeff King wrote: > > On Mon, Mar 25, 2019 at 01:43:23PM -0700, Jonathan Tan wrote: > > > In protocol v0, when sending "shallow" lines, the server distinguishes > > between lines caused by the remote repo being shallow and lines caused > > by client-specified depth

Re: [PATCH 2/2] fetch-pack: respect --no-update-shallow in v2

2019-03-25 Thread Jeff King
On Mon, Mar 25, 2019 at 01:43:23PM -0700, Jonathan Tan wrote: > In protocol v0, when sending "shallow" lines, the server distinguishes > between lines caused by the remote repo being shallow and lines caused > by client-specified depth settings. Unless "--update-shallow" is > specified, there is a

[PATCH 2/2] fetch-pack: respect --no-update-shallow in v2

2019-03-25 Thread Jonathan Tan
In protocol v0, when sending "shallow" lines, the server distinguishes between lines caused by the remote repo being shallow and lines caused by client-specified depth settings. Unless "--update-shallow" is specified, there is a difference in behavior: refs that reach the former "shallow" lines, bu