Re: [PATCH v3 04/28] update-server-info: do not publish shallow clones
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Nov 26, 2013, 12:41 UTC
- Message-ID
- <CACsJy8Duzkj4WVvXY8JEx4yNBjmY43+GCCp7oeQk21WT+5CJsg@mail.gmail.com>
- In-Reply-To
- <xmqqr4a4xn1a.fsf@gitster.dls.corp.google.com>
On Tue, Nov 26, 2013 at 3:08 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 24 quoted lines
> Nguyễn Thái Ngọc Duy <pclouds@gmail.com> writes: > >> Dumb commit walker does not care about .git/shallow and until someone >> steps up to make it happen, let's not publish shallow clones using >> dumb protocols. >> >> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> >> --- >> server-info.c | 9 +++++++++ >> 1 file changed, 9 insertions(+) > > I doubt that pros-and-cons is in this patch's favor. Without this > patch, if a fetch requests commits just on the surface in this > shallow repository, the walker would happily get the necessary > objects just fine. If the request has to dig deeper and cross the > shallow boundary, the walker will get a failure and error out. > > With this patch, both will error out. So overall, the patch did not > make anything safer (e.g. preventing from introducing new corruption > on the recipient's end) while breaking a case where it worked just > fine, no? > > Or am I missing something? Not that dumb walkers would matter very > much these days, ...
No you're not. If it may fail, in my opinion it should fail early than walk all the way and fail. But yeah dropping the patch is fine too. I don't care too much about dumb walkers.
-- Duy