{"thread":{"id":"32035","subject":"git-clone and unreliable links?","startedAt":"2012-11-07T15:35:19Z","lastAt":"2012-11-09T16:35:54Z","messageCount":3,"participants":["Josef Wolf","Shawn Pearce","Sitaram Chamarty"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"202613","messageId":"20121107153519.GI28437@raven.wolf.lan","threadId":"32035","inReplyTo":null,"subject":"git-clone and unreliable links?","fromName":"Josef Wolf","fromEmail":"jw@raven.inka.de","sentAt":"2012-11-07T15:35:19Z","receivedAt":"2012-11-07T15:35:19Z","isPatch":false,"sender":{"key":"jw@raven.inka.de","avatar":null},"body":"Hello,\n\nWhen using git-clone over an unreliable link (say, UMTS) and the network goes\ndown, git-clone deletes everything what was downloaded. When the network goes\nup again and you restart git-clone, it has to start over from the\nbeginning. Then, eventually, the network goes down again, and everything is\ndeleted again.\n\nIs there a way to omit the deleting step, so the second invocation would start\nwhere the first invocation was interrupted?\n"},{"id":"202615","messageId":"CAJo=hJtJPnQFjvz8AAQjf5Rze-_99vF_tYi9CqJ7fiW245Dv1w@mail.gmail.com","threadId":"32035","inReplyTo":"20121107153519.GI28437@raven.wolf.lan","subject":"Re: git-clone and unreliable links?","fromName":"Shawn Pearce","fromEmail":"spearce@spearce.org","sentAt":"2012-11-07T15:54:53Z","receivedAt":"2012-11-07T15:54:53Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"On Wed, Nov 7, 2012 at 7:35 AM, Josef Wolf <jw@raven.inka.de> wrote:\n> When using git-clone over an unreliable link (say, UMTS) and the network goes\n> down, git-clone deletes everything what was downloaded. When the network goes\n> up again and you restart git-clone, it has to start over from the\n> beginning. Then, eventually, the network goes down again, and everything is\n> deleted again.\n>\n> Is there a way to omit the deleting step, so the second invocation would start\n> where the first invocation was interrupted?\n\nNo, because a clone is not resumable.\n\nThe best way to obtain a repository over an unstable link is to ask\nthe repository owner to make a bundle file with `git bundle create\n--heads --tags` and serve the file using standard HTTP or rsync, which\nare resumable protocols. After you download the file, you can clone or\nfetch from the bundle to initialize your local repository, and then\nrun git fetch to incrementally update to anything that is more recent\nthan the bundle's creation.\n"},{"id":"202706","messageId":"CAMK1S_jK2w2RYWbFmqnwJdSVmFnacGPLbEGzUWOLukqK_=HEbA@mail.gmail.com","threadId":"32035","inReplyTo":"CAJo=hJtJPnQFjvz8AAQjf5Rze-_99vF_tYi9CqJ7fiW245Dv1w@mail.gmail.com","subject":"Re: git-clone and unreliable links?","fromName":"Sitaram Chamarty","fromEmail":"sitaramc@gmail.com","sentAt":"2012-11-09T16:35:54Z","receivedAt":"2012-11-09T16:35:54Z","isPatch":false,"sender":{"key":"sitaramc@gmail.com","avatar":"https://avatars.githubusercontent.com/u/43316?v=4"},"body":"On Wed, Nov 7, 2012 at 9:24 PM, Shawn Pearce <spearce@spearce.org> wrote:\n> On Wed, Nov 7, 2012 at 7:35 AM, Josef Wolf <jw@raven.inka.de> wrote:\n>> When using git-clone over an unreliable link (say, UMTS) and the network goes\n>> down, git-clone deletes everything what was downloaded. When the network goes\n>> up again and you restart git-clone, it has to start over from the\n>> beginning. Then, eventually, the network goes down again, and everything is\n>> deleted again.\n>>\n>> Is there a way to omit the deleting step, so the second invocation would start\n>> where the first invocation was interrupted?\n>\n> No, because a clone is not resumable.\n>\n> The best way to obtain a repository over an unstable link is to ask\n> the repository owner to make a bundle file with `git bundle create\n> --heads --tags` and serve the file using standard HTTP or rsync, which\n> are resumable protocols. After you download the file, you can clone or\n> fetch from the bundle to initialize your local repository, and then\n> run git fetch to incrementally update to anything that is more recent\n> than the bundle's creation.\n\nIf the server is running gitolite, the admin can set it up so that a\nbundle file is automatically created as needed (including \"don't do it\nmore than once per <duration>\" logic), and serve it up over rsync\nusing the same ssh credentials as for access to the repo itself.\n\nHowever, this is not particularly useful for systems with git://,\nalthough it could certainly be *adapted* for http access.\n\n[Documentation is inline, in src/commands/rsync, for people who wish to know.]\n\n-- \nSitaram\n"}]}