{"thread":{"id":"29001","subject":"git not resuming push","startedAt":"2011-11-23T03:58:56Z","lastAt":"2011-11-23T18:46:15Z","messageCount":5,"participants":["Paul Brossier","Jeff King","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"179856","messageId":"4ECC6F80.6010907@piem.org","threadId":"29001","inReplyTo":null,"subject":"git not resuming push","fromName":"Paul Brossier","fromEmail":"piem@piem.org","sentAt":"2011-11-23T03:58:56Z","receivedAt":"2011-11-23T03:58:56Z","isPatch":false,"sender":{"key":"piem@piem.org","avatar":null},"body":"Hi!\n\nI'm trying to upload large amount of data from a connection that often\ncuts.\n\nIf the connection fails after uploading part of the data, it seems I\nneed to start over from zero again. Is there a way to resume the upload\ninstead?\n\nHere is an example:\n\n$ git push\nCounting objects: 504, done.\nDelta compression using up to 2 threads.\nCompressing objects: 100% (475/475), done.\nWrite failed: Broken pipe1/476), 533.78 MiB | 60 KiB/s\nfatal: The remote end hung up unexpectedly\nerror: pack-objects died of signal 13\nerror: failed to push some refs to 'myhost.org:/git/myrepo/'\n\n$ git push\nCounting objects: 504, done.\nDelta compression using up to 2 threads.\nCompressing objects: 100% (475/475), done.\nWriting objects:  12% (61/476), 89.34 MiB | 23 KiB/s\n\nThanks, piem\n"},{"id":"179857","messageId":"20111123050220.GA9127@sigill.intra.peff.net","threadId":"29001","inReplyTo":"4ECC6F80.6010907@piem.org","subject":"Re: git not resuming push","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2011-11-23T05:02:20Z","receivedAt":"2011-11-23T05:02:20Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Nov 22, 2011 at 08:58:56PM -0700, Paul Brossier wrote:\n\n> If the connection fails after uploading part of the data, it seems I\n> need to start over from zero again. Is there a way to resume the upload\n> instead?\n\nNo, there isn't a way to resume just using push.\n\nIf you have shell access on the server, one workaround you can do is to\ncreate a bundle with the commits in question, upload it via some\nresumable protocol (like sftp, http, rsync, etc), possibly taking many\nattempts, and then fetch the result on the server side from the bundle\ninto the repository.\n\nSee \"git help bundle\" for some examples.\n\n-Peff\n"},{"id":"179858","messageId":"7vmxbncq5v.fsf@alter.siamese.dyndns.org","threadId":"29001","inReplyTo":"20111123050220.GA9127@sigill.intra.peff.net","subject":"Re: git not resuming push","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-11-23T06:24:12Z","receivedAt":"2011-11-23T06:24:12Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> On Tue, Nov 22, 2011 at 08:58:56PM -0700, Paul Brossier wrote:\n>\n>> If the connection fails after uploading part of the data, it seems I\n>> need to start over from zero again. Is there a way to resume the upload\n>> instead?\n>\n> No, there isn't a way to resume just using push.\n>\n> If you have shell access on the server, one workaround you can do is to\n> create a bundle with the commits in question, upload it via some\n> resumable protocol (like sftp, http, rsync, etc), possibly taking many\n> attempts, and then fetch the result on the server side from the bundle\n> into the repository.\n>\n> See \"git help bundle\" for some examples.\n\nAnother possibility, if it is the connection between you and the other\nside that is the problem, is to chunk your push in smaller pieces. That\nis, if you are trying to push out v3.0, you first push only to v1.0, then\nto v2.0, and then finally to v3.0.\n\nPeff, by the way, wouldn't this request reminds of us of a scenario we\ndiscussed recently, which I said I would imagine would be common while you\ndismissed as not likely to be common?\n"},{"id":"179895","messageId":"4ECD2C98.8030004@piem.org","threadId":"29001","inReplyTo":"7vmxbncq5v.fsf@alter.siamese.dyndns.org","subject":"Re: git not resuming push","fromName":"Paul Brossier","fromEmail":"piem@piem.org","sentAt":"2011-11-23T17:25:44Z","receivedAt":"2011-11-23T17:25:44Z","isPatch":false,"sender":{"key":"piem@piem.org","avatar":null},"body":"ok, that, with a bit of patience, should help!\n\nthank you both for your answers,\n\npiem\n\nOn 22/11/2011 23:24, Junio C Hamano wrote:\n> Jeff King<peff@peff.net>  writes:\n>\n>> On Tue, Nov 22, 2011 at 08:58:56PM -0700, Paul Brossier wrote:\n>>\n>>> If the connection fails after uploading part of the data, it seems I\n>>> need to start over from zero again. Is there a way to resume the upload\n>>> instead?\n>>\n>> No, there isn't a way to resume just using push.\n>>\n>> If you have shell access on the server, one workaround you can do is to\n>> create a bundle with the commits in question, upload it via some\n>> resumable protocol (like sftp, http, rsync, etc), possibly taking many\n>> attempts, and then fetch the result on the server side from the bundle\n>> into the repository.\n>>\n>> See \"git help bundle\" for some examples.\n>\n> Another possibility, if it is the connection between you and the other\n> side that is the problem, is to chunk your push in smaller pieces. That\n> is, if you are trying to push out v3.0, you first push only to v1.0, then\n> to v2.0, and then finally to v3.0.\n>\n> Peff, by the way, wouldn't this request reminds of us of a scenario we\n> discussed recently, which I said I would imagine would be common while you\n> dismissed as not likely to be common?\n>\n>\n"},{"id":"179899","messageId":"20111123184614.GA21146@sigill.intra.peff.net","threadId":"29001","inReplyTo":"7vmxbncq5v.fsf@alter.siamese.dyndns.org","subject":"Re: git not resuming push","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2011-11-23T18:46:15Z","receivedAt":"2011-11-23T18:46:15Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Nov 22, 2011 at 10:24:12PM -0800, Junio C Hamano wrote:\n\n> Another possibility, if it is the connection between you and the other\n> side that is the problem, is to chunk your push in smaller pieces. That\n> is, if you are trying to push out v3.0, you first push only to v1.0, then\n> to v2.0, and then finally to v3.0.\n> \n> Peff, by the way, wouldn't this request reminds of us of a scenario we\n> discussed recently, which I said I would imagine would be common while you\n> dismissed as not likely to be common?\n\nI didn't say it wasn't common; I said I didn't think it was the majority\ncase, and that I didn't want a solution that only helped this case\nwithout covering the other cases.\n\nAlso, it isn't clear to me that an immediate-reconnect scheme would\nwork. When the connection gets dropped, is it simply that TCP connection\nthat goes out, and another one could immediately be made to resume? Or\nis the network actually out (even if only for a few seconds)?\n\n-Peff\n"}]}