Re: Make "git clone" less of a deathly quiet experience
From: Petr Baudis <hidden>
Date: 2016-06-15 22:42:18
Dear diary, on Sat, Feb 11, 2006 at 09:44:00AM CET, I got a letter where Radoslaw Szkodzinski [off-list ref] said that...
Craig Schlenter wrote:quoted
On 11 Feb 2006, at 7:48 AM, Junio C Hamano wrote: It would be nice if the "partial pack" or whatever that has been downloaded at the time of the breakage could be re-used and things could start "from that point onwards" or the bits that were already received could be unpacked. Comments?It even already works on plain http repos with git fetch. (e.g. WineHQ repository) Why git protocol doesn't support it?
Because it works totally different. When downloading from plain HTTP repos, you are just downloading files from the remote repository and it is easy to pick up wherever you left (and last night, I just added a possibility to Cogito to resume an interrupted cg-clone by just cd'ing inside and running cg-fetch, as is; it's pretty neat) - you just resume downloading of the file you downloaded last, and don't download again the files you already have. But the native git protocol works completely differently - you tell the server "give me all objects you have between object X and head", the object will generate a completely custom pack just for you and send it over the network. The next time you fetch, you just ask for a pack between object X and head again, but the head can be already totally different. What we would have to do is to check for interrupted packfiles before fetching, attempt to fix them (cutting out the incomplete objects and broken delta chains, if applicable), and then tell the remote side to skip those objects; but that may not be easy because there can be a lot of "loose fibres". Another way would be to just tell the server "if head is still Y, start sending the pack only after N bytes". *shudder* -- Petr "Pasky" Baudis Stuff: http://pasky.or.cz/ Of the 3 great composers Mozart tells us what it's like to be human, Beethoven tells us what it's like to be Beethoven and Bach tells us what it's like to be the universe. -- Douglas Adams