Thread (1 message) 1 message, 1 author, 2020-05-14

Re: Add a "Flattened Cache" to `git --clone`?

From: Junio C Hamano <hidden>
Date: 2020-05-14 22:30:44

Caleb Gray [off-list ref] writes:
Actually those are the steps that I'm explicitly hoping can be
skipped, both on server and client, after the first successful clone
request transaction. The cache itself would be of the end resulting
`.git` directory (client side)... unless I have misconceptions about
If you look at .git/objects/pack/ directory in your repository that
is a clone of somebody else, most likely you'd find even number of
files in there, those whose filename ends with .pack and their
counterparts whose filename ends with .idx extension.  Both files
must exist to perform any local operation, but during the initial
cloning, only the bits in the former are transferred, and the
contents of the latter must be constructed from the bits in the
former.

You can introduce a new protocol that copies the contents of the
.idx, but the contents of that file MUST be validated on the
receiving end, which entails the same amount of computation as our
clients currently spend to construct it out of .pack, so in the end,
you'd be wasting more bandwidth to transfer .idx which is redundant
information without saving processing cycles.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help