Re: Re: [PATCH v5] builtin/clone.c: add --reject-shallow option

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

 



>Hi,
>
>On Mon, 1 Mar 2021, lilinchao@xxxxxxxxxx wrote:
>
>> >@@ -1440,6 +1444,8 @@ static void receive_shallow_info(struct fetch_pack_args *args,
>> > * shallow. In v0, remote refs that reach these objects are
>> > * rejected (unless --update-shallow is set); do the same.
>> > */
>> >+	if (args->remote_shallow)
>> >+	die("source repository is shallow, reject to clone.");
>>
>> I just found that Johannes Schindelin wrote a document 14 year ago
>> in Documentation/technical/shallow.txt:
>>
>> "There are some unfinished ends of the whole shallow business:
>>
>> A special handling of a shallow upstream is needed. At some stage,
>> upload-pack has to check if it sends a shallow commit, and it should
>> send that information early (or fail, if the client does not support 
>> shallow repositories). There is no support at all for this in this patch
>> series."
>
>Oh wow, what a blast from the past.
>
>I do agree that your patch is an improvement over the current situation. 
> 

Thanks. Glad to hear the voice from you, hope I can get some suggestions
from you too, especially on the transport part.

>Thanks,
>Johannes
>
>> It seems that my patch can sovle his worry in some degree,
>> and maybe we could warn client in fetch-pack stage, if we don't
>> choose to reject shallow cloning.
>>
>> if (args->remote_shallow)
>> die("source repository is shallow, reject to clone.");
>> else
>> warning("remote source repository is shallow.");
>> 







[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