{"thread":{"id":"47882","subject":"About connection resuming","startedAt":"2018-02-20T13:21:12Z","lastAt":"2018-02-20T19:43:43Z","messageCount":2,"participants":["chenzero","Stefan Beller"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"339706","messageId":"b85f9654-3552-30c0-79bb-84fe10309d8b@netease.com","threadId":"47882","inReplyTo":null,"subject":"About connection resuming","fromName":"chenzero","fromEmail":"chenzero@netease.com","sentAt":"2018-02-20T12:49:42Z","receivedAt":"2018-02-20T13:21:12Z","isPatch":false,"sender":{"key":"chenzero@netease.com","avatar":null},"body":"Hello,\nFirst, I am a user of git for about 2 years, I really appreciated you \nall to create this great useful software!\nMy encountered problem is:\nsometimes, the repo is big and because my networking is not stable(or my \nnetwork proxy has\nsome limitations), so, the clone will always fail.\nI tried following ways to solve this, however, not much success.\n1. clone depth 1\ngit clone --depth=1 https://..../repo.git\nhowever, some repo even depth=1 might fail.(It seemed that my network \nproxy limit tcp connection.\nif transfer over 50M, it will break)\n2. download bundle file.\nbut no all git repo provide bundle files to download.\n\nAfter some investment on the code, I think, perhaps,\nif enhance the git-http-backend to support http header: Range, or \nContent-Range,\nmaybe it will enable connection resuming.\nthe problem of this way is: it needs to upgrade the current deployed \n\"git-http-backend\",\nand maybe much code need to change including git-remote-http etc.\n\nThis is the very basic thought, and whether I should try other way ?\nThanks a lot!\n\n"},{"id":"339732","messageId":"CAGZ79kYytJOFhzdpWnWNs574KeLQ2f1AtkdAQ1-o6P5=VO=r_Q@mail.gmail.com","threadId":"47882","inReplyTo":"b85f9654-3552-30c0-79bb-84fe10309d8b@netease.com","subject":"Re: About connection resuming","fromName":"Stefan Beller","fromEmail":"sbeller@google.com","sentAt":"2018-02-20T19:43:37Z","receivedAt":"2018-02-20T19:43:43Z","isPatch":false,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"On Tue, Feb 20, 2018 at 4:49 AM, chenzero <chenzero@netease.com> wrote:\n> Hello,\n> First, I am a user of git for about 2 years, I really appreciated you all to\n> create this great useful software!\n\nHi, welcome to the mailing list!\n\n> My encountered problem is:\n> sometimes, the repo is big and because my networking is not stable(or my\n> network proxy has\n> some limitations), so, the clone will always fail.\n> I tried following ways to solve this, however, not much success.\n> 1. clone depth 1\n> git clone --depth=1 https://..../repo.git\n> however, some repo even depth=1 might fail.(It seemed that my network proxy\n> limit tcp connection.\n> if transfer over 50M, it will break)\n> 2. download bundle file.\n> but no all git repo provide bundle files to download.\n>\n> After some investment on the code, I think, perhaps,\n> if enhance the git-http-backend to support http header: Range, or\n> Content-Range,\n> maybe it will enable connection resuming.\n\nThis thought has come up before, for example\nhttps://public-inbox.org/git/1473984742-12516-1-git-send-email-kevin.m.wern@gmail.com/\n(Or you can search for \"resumable clone\" in that mailing list archive,\nthere are more interesting discussions)\n\nBut the current problem is that the bytes of a clone are not stable,\nas the packs are ordered racily IIUC: So if you clone the same repository\n(with the same branch values), the observed communication over the wire\nmay differ in the part when the pack file is transferred as the packfile is\npacked up in a multi threaded fashion, that has no clear order defined.\n\n> the problem of this way is: it needs to upgrade the current deployed\n> \"git-http-backend\",\n> and maybe much code need to change including git-remote-http etc.\n>\n> This is the very basic thought, and whether I should try other way ?\n> Thanks a lot!\n\nI think a more promising approach is to have support for references\ninside the packfile for transfer, this could become one of the features\nof the new protocol that is being worked on\nhttps://public-inbox.org/git/20180207011312.189834-1-bmwill@google.com/\nI do not find a reference for the idea, but Jonathan (cc'd) laid it out\nwell once upon a time. Jonathan do you have a mailing list reference\nfor references in packfiles?\n\nThanks,\nStefan\n"}]}