git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Duy Nguyen <pclouds@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Git Mailing List <git@vger.kernel.org>, Andreas Krey <a.krey@gmx.de>
Subject: Re: [PATCH] upload-pack: reject shallow requests that would return nothing
Date: Mon, 4 Jun 2018 16:44:07 +0200	[thread overview]
Message-ID: <CACsJy8D5105r0=_pzfz8fTciQeXWCBe-qhsobR+_TJvfz7cv4Q@mail.gmail.com> (raw)
In-Reply-To: <xmqq602y6d8c.fsf@gitster-ct.c.googlers.com>

On Mon, Jun 4, 2018 at 12:46 PM, Junio C Hamano <gitster@pobox.com> wrote:
> Nguyễn Thái Ngọc Duy  <pclouds@gmail.com> writes:
>
>> Shallow clones with --shallow-since or --shalow-exclude work by
>> running rev-list to get all reachable commits, then draw a boundary
>> between reachable and unreachable and send "shallow" requests based on
>> that.
>>
>> The code does miss one corner case: if rev-list returns nothing, we'll
>> have no border and we'll send no shallow requests back to the client
>> (i.e. no history cuts). This essentially means a full clone (or a full
>> branch if the client requests just one branch). One example is the
>> oldest commit is older than what is specified by --shallow-since.
>
> "the newest commit is older than", isn't it?  That is, the cutoff
> point specified is newer than the existing history.

Yes. As a result, the entirely history is cut, including the tip.
--shallow-exclude could also lead to this situation if the user
accidentally excludes everything.
-- 
Duy

      reply	other threads:[~2018-06-04 14:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-22 19:48 bug: --shallow-since misbehaves on old branch heads Andreas Krey
2018-05-23 16:02 ` Duy Nguyen
2018-05-26 11:35 ` [PATCH] upload-pack: reject shallow requests that would return nothing Nguyễn Thái Ngọc Duy
2018-05-28  5:55   ` Junio C Hamano
2018-05-28 18:48     ` Duy Nguyen
2018-06-02  6:06       ` Duy Nguyen
2018-06-04 10:46   ` Junio C Hamano
2018-06-04 14:44     ` Duy Nguyen [this message]

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CACsJy8D5105r0=_pzfz8fTciQeXWCBe-qhsobR+_TJvfz7cv4Q@mail.gmail.com' \
    --to=pclouds@gmail.com \
    --cc=a.krey@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).