Re: [PATCH] Document the underlying protocol used by shallow repositories and --depth commands.

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

 



Alex Neronskiy <zakmagnus@xxxxxxxxxx> writes:

> Junio C Hamano <gitster <at> pobox.com> writes:
>
>> > +Once all the 'want's and 'shallow's (and optional 'deepen') are
>> > +transferred, clients MUST send a flush-pkt. If the client has all
>> > +the references on the server, and as much of their commit history
>> > +as it is interested in, client flushes and disconnects.
>> 
>> Hmmmmm, are you describing "everything-local then flush and all-done" in
>> do_fetch_pack() with the second sentence? If so, placing the description
>> here is misleading. In that case, I do not think any of the find-common
>> exchange starting from the "upload-request" phase happens.
>
> No, this refers to the same event which was already described in that document,
> which I believe happens from inside find_common.

"The same event which was already described in that document" meaning at
the beginning of "Packfile Negotiation" section?  That is primarily about
the "ls-remote" that probed the server for the list of current refs, which
is received in connect.c::get_remote_heads(), but it also covers another
case. When fetching, after connect.c::get_remote_heads() finds the list of
current refs, do_fetch_pack() is called, and then everything_local() in it
checks if we have all the objects we are going to ask. If so, we flush and
jump to all_done to terminate the connection, skipping find_common(),
without doing any of the want/shallow/depth/etc.

I don't seem to be able to find where in find_common() and its callee we
could quit without telling the server anything (unless we crash ;-). Even
if get_rev() loop finds nothing, we would at least say "done".

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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]