From: Junio C Hamano <gitster@pobox.com>
To: Michael Edgar <adgar@google.com>
Cc: Jeff King <peff@peff.net>, Duy Nguyen <pclouds@gmail.com>,
Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH] clone: check if server supports shallow clones
Date: Thu, 11 Jun 2015 13:44:35 -0700 [thread overview]
Message-ID: <xmqqzj46dlfw.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <CALkbG6+vRqKwmBjK9jwSph4iUUbqPjiuNdHEeT3nvFhFJ0VpEg@mail.gmail.com> (Michael Edgar's message of "Thu, 11 Jun 2015 14:18:00 -0400")
Michael Edgar <adgar@google.com> writes:
> On Thu, Jun 11, 2015 at 10:32 AM, Jeff King <peff@peff.net> wrote:
>> On Thu, Jun 11, 2015 at 08:02:33PM +0700, Duy Nguyen wrote:
>>
>>> > I see that do_fetch_pack checks server_supports("shallow"). Is that
>>> > enough to cover all fetch cases? And if it is, why does it not cover the
>>> > matching clone cases?
>>>
>>> I think this replacement check would do
>>>
>>> if ((args->depth > 0 || is_repository_shallow()) && !server_supports("shallow"))
>>> die("Server does not support shallow clients");
>>
>> Oh, indeed, there is the depth flag I was looking for. :)
>>
>> And from some rudimentary testing, I believe that:
>>
>> git init
>> git fetch --depth=1 ...
>>
>> is currently broken in the same way as clone (we are not shallow yet, so
>> it does not complain when the server does not support it). I think the
>> patch above fixes both that and the clone case.
>
> Shall I send that out as a revised patch for review? (This is my first
> stab at a Git
> patch)
Surely, and thanks. Hopefully one or both of them will Ack it and
all there is left for me to do will be to pick it up ;-)
next prev parent reply other threads:[~2015-06-11 20:44 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-10 18:35 [PATCH] clone: check if server supports shallow clones Mike Edgar
2015-06-10 19:05 ` Jeff King
2015-06-10 20:25 ` Michael Edgar
2015-06-10 20:56 ` Jeff King
2015-06-11 13:02 ` Duy Nguyen
2015-06-11 14:32 ` Jeff King
2015-06-11 18:18 ` Michael Edgar
2015-06-11 20:44 ` Junio C Hamano [this message]
2015-06-17 11:48 ` [PATCH v2] fetch-pack: check for shallow if depth given Mike Edgar
2015-06-17 17:00 ` Jeff King
2015-06-17 16:35 ` [PATCH] clone: check if server supports shallow clones Junio C Hamano
2015-06-17 16:59 ` Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqzj46dlfw.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=adgar@google.com \
--cc=git@vger.kernel.org \
--cc=pclouds@gmail.com \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.