Re: [PATCH] upload-pack: reject shallow requests that would return nothing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jun 4, 2018 at 12:46 PM, Junio C Hamano <gitster@xxxxxxxxx> wrote:
> Nguyễn Thái Ngọc Duy  <pclouds@xxxxxxxxx> 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




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux