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

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

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

2018-06-04 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy 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

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

2018-06-02 Thread Duy Nguyen
On Mon, May 28, 2018 at 8:48 PM, Duy Nguyen wrote: > On Mon, May 28, 2018 at 7:55 AM, Junio C Hamano wrote: >> Nguyễn Thái Ngọc Duy writes: >> >>> To avoid this, if rev-list returns nothing, we abort the clone/fetch. >>> The user could adjust their request (e.g. --shallow-since further back

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

2018-05-28 Thread Duy Nguyen
On Mon, May 28, 2018 at 7:55 AM, Junio C Hamano wrote: > Nguyễn Thái Ngọc Duy writes: > >> To avoid this, if rev-list returns nothing, we abort the clone/fetch. >> The user could adjust their request (e.g. --shallow-since further back >> in the past) and retry. > > Yeah, that makes sense. > >>

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

2018-05-27 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > To avoid this, if rev-list returns nothing, we abort the clone/fetch. > The user could adjust their request (e.g. --shallow-since further back > in the past) and retry. Yeah, that makes sense. > Another possible option for this case is to fall

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

2018-05-26 Thread Nguyễn Thái Ngọc Duy
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