Re: [PATCH] fetch: when deepening, check connectivity fully

2018-06-29 Thread Jonathan Tan
> > That is the way it should work, but after thinking about it once more, I > > realize that it isn't. > > > > opt->shallow_file is not set to anything. And fetch-pack updates the > > shallow file by itself (at least, that is my understanding of > > update_shallow() in fetch-pack.c) before fetch c

Re: [PATCH] fetch: when deepening, check connectivity fully

2018-06-27 Thread Junio C Hamano
Jonathan Tan writes: >> Hmph, don't we quote these in the trace output, requiring us to grep >> for "'--not' '--all'" or somesuch? > > I thought so too, but this was changed in commit 1fbdab21bb ("trace: > avoid unnecessary quoting", 2018-01-16). Yup; fortunately or unfortunately, that and the

Re: [PATCH] fetch: when deepening, check connectivity fully

2018-06-27 Thread Junio C Hamano
Jonathan Tan writes: >> Hmph, remind me how old and/or new shallow cut-off points affect >> this traversal? In order to verify that everything above the new >> cut-off points, opt->shallow_file should be pointing at the new >> cut-off points, then we do the full sweep (without --not --all) to >>

Re: [PATCH] fetch: when deepening, check connectivity fully

2018-06-27 Thread Jonathan Tan
> Jonathan Tan writes: > > > +test_expect_success 'shallow fetches check connectivity without stopping > > at existing refs' ' > > + cp -R .git server.git && > > + > > + # Normally, the connectivity check stops at ancestors of existing refs. > > + git init client && > > + GIT_TRACE="$(pw

Re: [PATCH] fetch: when deepening, check connectivity fully

2018-06-27 Thread Jonathan Tan
> Hmph, remind me how old and/or new shallow cut-off points affect > this traversal? In order to verify that everything above the new > cut-off points, opt->shallow_file should be pointing at the new > cut-off points, then we do the full sweep (without --not --all) to > ensure we won't find missin

Re: [PATCH] fetch: when deepening, check connectivity fully

2018-06-27 Thread Junio C Hamano
Jonathan Tan writes: > +test_expect_success 'shallow fetches check connectivity without stopping at > existing refs' ' > + cp -R .git server.git && > + > + # Normally, the connectivity check stops at ancestors of existing refs. > + git init client && > + GIT_TRACE="$(pwd)/trace"

Re: [PATCH] fetch: when deepening, check connectivity fully

2018-06-27 Thread Junio C Hamano
Jonathan Tan writes: > Do not stop at ancestors of our refs when deepening during fetching. > This is because when performing such a fetch, shallow entries may have > been updated; the client can reasonably assume that the existing refs > are connected up to the old shallow points, but not the ne

[PATCH] fetch: when deepening, check connectivity fully

2018-06-27 Thread Jonathan Tan
Do not stop at ancestors of our refs when deepening during fetching. This is because when performing such a fetch, shallow entries may have been updated; the client can reasonably assume that the existing refs are connected up to the old shallow points, but not the new. This was noticed when a use