{"thread":{"id":"38128","subject":"How to repair a shallow clone (?)","startedAt":"2014-12-06T12:23:59Z","lastAt":"2014-12-07T17:53:30Z","messageCount":5,"participants":["Torsten Bögershausen","Trần Ngọc Quân","Philip Oakley","Duy Nguyen"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"253240","messageId":"5482F55F.1060008@web.de","threadId":"38128","inReplyTo":null,"subject":"How to repair a shallow clone (?)","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2014-12-06T12:23:59Z","receivedAt":"2014-12-06T12:23:59Z","isPatch":false,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"I share a bare repo with Sparkleshare which does an auto-synch.\nNow the synch had stopped, and trying to push to the central repo\nby hand gives this:\n\n\n\ngit push  origin master\nfatal: protocol error: expected old/new/ref, got 'shallow 72fb4080921221293e28a97a0e8c78d6100c5186'\nfatal: The remote end hung up unexpectedly\nCounting objects: 4, done.\nDelta compression using up to 2 threads.\nCompressing objects: 100% (4/4), done.\nerror: pack-objects died of signal 13\nerror: failed to push some refs to xxxxx\n\nBoth machines have Git >2.0.0\n\nIs this a known issue/problem ?\n\nI think I started to clone the repo in a shallow way\n(SparkleShare asked if I want to clone the complete history,\nand I probably answered \"no\" )\n\nIs there a way to repair this situation ?\n(Except doing a complete re-clone ?)\n\nThanks for help\n"},{"id":"253259","messageId":"5483A166.4010109@gmail.com","threadId":"38128","inReplyTo":"5482F55F.1060008@web.de","subject":"Re: How to repair a shallow clone (?)","fromName":"Trần Ngọc Quân","fromEmail":"vnwildman@gmail.com","sentAt":"2014-12-07T00:37:58Z","receivedAt":"2014-12-07T00:37:58Z","isPatch":false,"sender":{"key":"vnwildman@gmail.com","avatar":"https://avatars.githubusercontent.com/u/508758?v=4"},"body":"On 06/12/2014 19:23, Torsten Bögershausen wrote:\n> I think I started to clone the repo in a shallow way\n> (SparkleShare asked if I want to clone the complete history,\n> and I probably answered \"no\" )\n>\n> Is there a way to repair this situation ?\n> (Except doing a complete re-clone ?)\n>\nI think git don't accept push from shallow repo. I've ever encounter\nthis problem. I UNshallow it, then every thing will work:\n\n$ git fetch --unshallow origin\n\nThis command will convert a shallow repository to a complete one.\nSee git-fetch(1) and git-clone(1).\n\nI hope it helpful!\nThanks,\n\n-- \nTrần Ngọc Quân.\n"},{"id":"253279","messageId":"C4634931164E4141BEC9D1395D80CF9B@PhilipOakley","threadId":"38128","inReplyTo":"5483A166.4010109@gmail.com","subject":"Re: How to repair a shallow clone (?)","fromName":"Philip Oakley","fromEmail":"philipoakley@iee.org","sentAt":null,"receivedAt":"2014-12-07T10:47:23Z","isPatch":false,"sender":{"key":"philipoakley@iee.email","avatar":"https://avatars.githubusercontent.com/u/914343?v=4"},"body":"From: \"Trần Ngọc Quân\" <vnwildman@gmail.com>\n> On 06/12/2014 19:23, Torsten Bögershausen wrote:\n>> I think I started to clone the repo in a shallow way\n>> (SparkleShare asked if I want to clone the complete history,\n>> and I probably answered \"no\" )\n>>\n>> Is there a way to repair this situation ?\n>> (Except doing a complete re-clone ?)\n>>\n> I think git don't accept push from shallow repo. I've ever encounter\n> this problem. I UNshallow it, then every thing will work:\n>\n> $ git fetch --unshallow origin\n>\n> This command will convert a shallow repository to a complete one.\n> See git-fetch(1) and git-clone(1).\n>\nSince v1.9.0 (14 Feb '14.) you can do various push/pull from a shallow \nclone (I'd asked this way back \nhttp://stackoverflow.com/questions/6900103/why-cant-i-push-from-a-shallow-clone \nand noted when it was corrected/improved)\n\nThat's not to say that you don't have to take care about your local \ndepth being sufficiently inclusive.\n\nI'm sure that sometime a --timedepth=<time_t time> will eventually be \ncoded by someone sufficiently in need. ;-)\n\n--\nPhilip \n"},{"id":"253280","messageId":"CACsJy8DshPJreCDOUYWO90E9jsDVe8XO_jVjMCcC=DV8EK6N5Q@mail.gmail.com","threadId":"38128","inReplyTo":"5482F55F.1060008@web.de","subject":"Re: How to repair a shallow clone (?)","fromName":"Duy Nguyen","fromEmail":"pclouds@gmail.com","sentAt":"2014-12-07T11:44:09Z","receivedAt":"2014-12-07T11:44:09Z","isPatch":false,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Sat, Dec 6, 2014 at 7:23 PM, Torsten Bögershausen <tboegi@web.de> wrote:\n> I share a bare repo with Sparkleshare which does an auto-synch.\n> Now the synch had stopped, and trying to push to the central repo\n> by hand gives this:\n>\n>\n>\n> git push  origin master\n> fatal: protocol error: expected old/new/ref, got 'shallow 72fb4080921221293e28a97a0e8c78d6100c5186'\n> fatal: The remote end hung up unexpectedly\n> Counting objects: 4, done.\n> Delta compression using up to 2 threads.\n> Compressing objects: 100% (4/4), done.\n> error: pack-objects died of signal 13\n> error: failed to push some refs to xxxxx\n>\n> Both machines have Git >2.0.0\n\nPlease try again with $GIT_TRACE_PACKET=/some-log-file. receive-pack\n>2.0 should recognize this shallow line.\n\n> Is this a known issue/problem ?\n\nNo.\n-- \nDuy\n"},{"id":"253285","messageId":"5484941A.4040300@web.de","threadId":"38128","inReplyTo":"CACsJy8DshPJreCDOUYWO90E9jsDVe8XO_jVjMCcC=DV8EK6N5Q@mail.gmail.com","subject":"Re: How to repair a shallow clone (?)","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2014-12-07T17:53:30Z","receivedAt":"2014-12-07T17:53:30Z","isPatch":false,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"On 2014-12-07 12.44, Duy Nguyen wrote:\n>> Is this a known issue/problem ?\n> \n> No.\n> \nThanks everybody for the support.\n\nThe machine was equipped with git version 1.7.10.4 in /usr/bin.\n\nI installed 2.1 or so under /usr/local/bin, (and even /root/bin) \nthinking that this would help, but it didn't.\n\nBecause the login shell for the user \"storage\" which manages the push/pull\non the server side was /usr/bin/git-shell, not /usr/local/bin/git-shell.\n"}]}