Re: [WIP RFC 2/5] Documentation: add Packfile URIs design doc
- Date: Wed, 05 Dec 2018 14:55:00 +0900
- From: Junio C Hamano <gitster@xxxxxxxxx>
- Subject: Re: [WIP RFC 2/5] Documentation: add Packfile URIs design doc
Junio C Hamano <gitster@xxxxxxxxx> writes:
> So, this is OK, but
>> +Clients then should understand that the returned packfile could be incomplete,
>> +and that it needs to download all the given URIs before the fetch or clone is
>> +complete. Each URI should point to a Git packfile (which may be a thin pack and
>> +which may contain offset deltas).
> weaken or remove the (parenthetical comment) in the last sentence,
> and replace the beginning of the section with something like
> If the client replies with 'packfile-uris', when the server
> sends the packfile, it MAY send a `packfile-uris` section...
> You may steal what I wrote in the above response to help the
> server-side folks to decide how to actually implement the "it MAY
> send a packfile-uris" part in the document.
By the way, I do agree with the practical consideration the design
you described makes. For a pregenerated pack that brings you from
v1.0 to v2.0, "thin" would roughly save the transfer of one full
checkout (compressed, of course), and "ofs" would also save several
bytes per object. Compared to a single pack that delivers everything
the fetcher wants, concatenation of packs without "thin" to transfer
the same set of objects would cost quite a lot more.
And I do not think we should care too much about fetchers that lack
either thin or ofs, so I'd imagine that any client that ask for
packfile-uris would also advertise thin and ofs as well, so in
practice, a request with packfile-uris that lack thin or ofs would
be pretty rare and requiring all three and requiring only one would
not make much practical difference. It's just that I think singling
out these two capabilities as hard requirements at the protocol
level is wrong.