{"thread":{"id":"35418","subject":"RE: How to resume broke clone ?","startedAt":"2013-11-28T08:32:36Z","lastAt":"2013-11-28T09:12:59Z","messageCount":2,"participants":["Max Kirillov","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"231228","messageId":"20131128013236.96eec638b311907e2368f42b42021fd8.17478ad17f.wbe@email02.secureserver.net","threadId":"35418","inReplyTo":null,"subject":"RE: How to resume broke clone ?","fromName":"Max Kirillov","fromEmail":"max@max630.net","sentAt":"2013-11-28T08:32:36Z","receivedAt":"2013-11-28T08:32:36Z","isPatch":false,"sender":{"key":"max@max630.net","avatar":"https://avatars.githubusercontent.com/u/381560?v=4"},"body":"> git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git\n> \n> I am in china. our bandwidth is very limitation. Less than 50Kb/s.\n\nYou could manually download big packed bundled from some http remote.\nFor example http://repo.or.cz/r/linux.git\n\n* create a new repository, add the remote there.\n\n* download files with wget or whatever:\n http://repo.or.cz/r/linux.git/objects/info/packs\nalso files mentioned in the file. Currently they are:\n http://repo.or.cz/r/linux.git/objects/pack/pack-3807b40fc5fd7556990ecbfe28a54af68964a5ce.idx\n http://repo.or.cz/r/linux.git/objects/pack/pack-3807b40fc5fd7556990ecbfe28a54af68964a5ce.pack\n\nand put them to the corresponding places.\n\n* then run fetch of pull. I believe it should run fast then. Though I\nhave not test it.\n\nBr,\n-- \nMax\n"},{"id":"231233","messageId":"20131128091258.GB11444@sigill.intra.peff.net","threadId":"35418","inReplyTo":"20131128013236.96eec638b311907e2368f42b42021fd8.17478ad17f.wbe@email02.secureserver.net","subject":"Re: How to resume broke clone ?","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2013-11-28T09:12:59Z","receivedAt":"2013-11-28T09:12:59Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Nov 28, 2013 at 01:32:36AM -0700, Max Kirillov wrote:\n\n> > git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git\n> > \n> > I am in china. our bandwidth is very limitation. Less than 50Kb/s.\n> \n> You could manually download big packed bundled from some http remote.\n> For example http://repo.or.cz/r/linux.git\n> \n> * create a new repository, add the remote there.\n> \n> * download files with wget or whatever:\n>  http://repo.or.cz/r/linux.git/objects/info/packs\n> also files mentioned in the file. Currently they are:\n>  http://repo.or.cz/r/linux.git/objects/pack/pack-3807b40fc5fd7556990ecbfe28a54af68964a5ce.idx\n>  http://repo.or.cz/r/linux.git/objects/pack/pack-3807b40fc5fd7556990ecbfe28a54af68964a5ce.pack\n> \n> and put them to the corresponding places.\n> \n> * then run fetch of pull. I believe it should run fast then. Though I\n> have not test it.\n\nYou would also need to set up local refs so that git knows you have\nthose objects. The simplest way to do it is to just fetch by dumb-http,\nwhich can resume the pack transfer. I think that clone is also very\neager to clean up the partial transfer if the initial fetch fails. So\nyou would want to init manually:\n\n  git init linux\n  cd linux\n  git remote add origin http://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git\n  GIT_SMART_HTTP=0 git fetch -vv\n\nand then you can follow that up with regular smart fetches, which should\nbe much smaller.\n\nIt would be even simpler if you could fetch the whole thing as a bundle,\nrather than over dumb-http. But that requires the server side (or some\nthird party who has fast access to the repo) cooperating and making a\nbundle available.\n\n-Peff\n"}]}