{"thread":{"id":"50393","subject":"Partial clone - bad pack header?","startedAt":"2019-02-04T13:45:50Z","lastAt":"2019-02-05T10:14:26Z","messageCount":3,"participants":["Luke Diamand","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"368458","messageId":"CAE5ih7-Gi6i8ZRDjsVELLesTORRDxvrLYf00DYTBRFUWUmAAdw@mail.gmail.com","threadId":"50393","inReplyTo":null,"subject":"Partial clone - bad pack header?","fromName":"Luke Diamand","fromEmail":"luke@diamand.org","sentAt":"2019-02-04T13:45:35Z","receivedAt":"2019-02-04T13:45:50Z","isPatch":false,"sender":{"key":"luke@diamand.org","avatar":"https://avatars.githubusercontent.com/u/5330967?v=4"},"body":"I tried to do a partial clone, but it gave me a \"bad pack header\". Is\nthere anything I can do to debug this?\n\nI did \"git config uploadpack.allowfilter true\" in my repo.\nThen I went to a scratch directory and did:\n$ git clone --filter=blob:limit=10M ssh://localhost/~/git/my_big_repo\nremote: Enumerating objects: 1619425, done.\nremote: Counting objects: 100% (1619425/1619425), done.\nremote: Compressing objects: 100% (362435/362435), done.\nremote: Total 1619425 (delta 1225623), reused 1604277 (delta 1211975)\nReceiving objects: 100% (1619425/1619425), 10.34 GiB | 35.61 MiB/s, done.\nResolving deltas: 100% (1225623/1225623), done.\nNote: checking out 'a943f529b4781f34602f1ad5aab99a8699975c29'.\n\nYou are in 'detached HEAD' state. You can look around, make experimental\nchanges and commit them, and you can discard any commits you make in this\nstate without impacting any branches by performing another checkout.\n\nIf you want to create a new branch to retain commits you create, you may\ndo so (now or later) by using -b with the checkout command again. Example:\n\n  git checkout -b <new-branch-name>\n\nfatal: the remote end hung up unexpectedly\nfatal: protocol error: bad pack header\nwarning: Clone succeeded, but checkout failed.\nYou can inspect what was checked out with 'git status'\nand retry the checkout with 'git checkout -f HEAD'\n\n$  git checkout origin/master\nfatal: the remote end hung up unexpectedly\nfatal: protocol error: bad pack header\n\n$ git --version\ngit version 2.20.1.611.gfbb209baf1\n\nThere's plenty of disk space left.\n\nThanks,\nLuke\n"},{"id":"368496","messageId":"20190204232844.GA2366@sigill.intra.peff.net","threadId":"50393","inReplyTo":"CAE5ih7-Gi6i8ZRDjsVELLesTORRDxvrLYf00DYTBRFUWUmAAdw@mail.gmail.com","subject":"Re: Partial clone - bad pack header?","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2019-02-04T23:28:45Z","receivedAt":"2019-02-04T23:28:51Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Feb 04, 2019 at 01:45:35PM +0000, Luke Diamand wrote:\n\n> I tried to do a partial clone, but it gave me a \"bad pack header\". Is\n> there anything I can do to debug this?\n> \n> I did \"git config uploadpack.allowfilter true\" in my repo.\n> Then I went to a scratch directory and did:\n> $ git clone --filter=blob:limit=10M ssh://localhost/~/git/my_big_repo\n> remote: Enumerating objects: 1619425, done.\n> remote: Counting objects: 100% (1619425/1619425), done.\n> remote: Compressing objects: 100% (362435/362435), done.\n> remote: Total 1619425 (delta 1225623), reused 1604277 (delta 1211975)\n> Receiving objects: 100% (1619425/1619425), 10.34 GiB | 35.61 MiB/s, done.\n> Resolving deltas: 100% (1225623/1225623), done.\n> Note: checking out 'a943f529b4781f34602f1ad5aab99a8699975c29'.\n> [...]\n> fatal: the remote end hung up unexpectedly\n> fatal: protocol error: bad pack header\n> warning: Clone succeeded, but checkout failed.\n\nJust a guess, but does setting uploadpack.allowAnySHA1InWant to \"true\"\nin the source repo help?\n\nBy default, upload-pack will not allow the client to request those\narbitrary blob sha1s. I thought it was _supposed_ to notice this and\ncomplain with a nice error message, but I know I have run into cases in\nthe past where it does not (but never tracked it down -- this may well\nbe one of them).\n\n-Peff\n"},{"id":"368515","messageId":"CAE5ih7-8Z6r1yrRMZN24wEoOqz_S=63HGg9RkNyYXhbXFgh1Fg@mail.gmail.com","threadId":"50393","inReplyTo":"20190204232844.GA2366@sigill.intra.peff.net","subject":"Re: Partial clone - bad pack header?","fromName":"Luke Diamand","fromEmail":"luke@diamand.org","sentAt":"2019-02-05T10:14:12Z","receivedAt":"2019-02-05T10:14:26Z","isPatch":false,"sender":{"key":"luke@diamand.org","avatar":"https://avatars.githubusercontent.com/u/5330967?v=4"},"body":"On Mon, 4 Feb 2019 at 23:28, Jeff King <peff@peff.net> wrote:\n>\n> On Mon, Feb 04, 2019 at 01:45:35PM +0000, Luke Diamand wrote:\n>\n> > I tried to do a partial clone, but it gave me a \"bad pack header\". Is\n> > there anything I can do to debug this?\n> >\n> > I did \"git config uploadpack.allowfilter true\" in my repo.\n> > Then I went to a scratch directory and did:\n> > $ git clone --filter=blob:limit=10M ssh://localhost/~/git/my_big_repo\n> > remote: Enumerating objects: 1619425, done.\n> > remote: Counting objects: 100% (1619425/1619425), done.\n> > remote: Compressing objects: 100% (362435/362435), done.\n> > remote: Total 1619425 (delta 1225623), reused 1604277 (delta 1211975)\n> > Receiving objects: 100% (1619425/1619425), 10.34 GiB | 35.61 MiB/s, done.\n> > Resolving deltas: 100% (1225623/1225623), done.\n> > Note: checking out 'a943f529b4781f34602f1ad5aab99a8699975c29'.\n> > [...]\n> > fatal: the remote end hung up unexpectedly\n> > fatal: protocol error: bad pack header\n> > warning: Clone succeeded, but checkout failed.\n>\n> Just a guess, but does setting uploadpack.allowAnySHA1InWant to \"true\"\n> in the source repo help?\n\nThat's a very good guess - it works a treat with that!\n\n>\n> By default, upload-pack will not allow the client to request those\n> arbitrary blob sha1s. I thought it was _supposed_ to notice this and\n> complain with a nice error message, but I know I have run into cases in\n> the past where it does not (but never tracked it down -- this may well\n> be one of them).\n>\n> -Peff\n"}]}