{"thread":{"id":"40014","subject":"fetching from an hg remote fails with bare git repositories","startedAt":"2015-08-04T17:45:07Z","lastAt":"2015-08-06T18:21:01Z","messageCount":5,"participants":["Taylor Braun-Jones","Stefan Beller","Mike Hommey"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"267473","messageId":"CAKfKJYuuO+eak-L2SUVUEmoOj16bgV6LL0S=g-LzFjTxZUcRzQ@mail.gmail.com","threadId":"40014","inReplyTo":null,"subject":"fetching from an hg remote fails with bare git repositories","fromName":"Taylor Braun-Jones","fromEmail":"taylor@braun-jones.org","sentAt":"2015-08-04T17:45:07Z","receivedAt":"2015-08-04T17:45:07Z","isPatch":false,"sender":{"key":"taylor@braun-jones.org","avatar":"https://gravatar.com/avatar/91c2af014ddf9c0cb1aa6401f22d7b210d1be6df84e17997031e4994570dcdf9?d=mp&s=160"},"body":"Fetching from an hg remote fails with bare git repositories. Non-bare\nrepositories work fine.\n\nSteps to reproduce:\n\nmkdir /tmp/hgrepo\ncd /tmp/hgrepo\nhg init\necho foo > foo.txt\nhg add foo.txt\nhg commit -m \"add foo.txt\" foo.txt\ngit clone hg::/tmp/hgrepo/ /tmp/gitrepo\ncd /tmp/gitrepo/\ngit fetch # WORKS\ngit clone --bare hg::/tmp/hgrepo/ /tmp/gitrepo.git\ncd /tmp/gitrepo.git/\ngit fetch # FAILS\n\nThe error message from the last line is:\n\nfatal: bad object 0000000000000000000000000000000000000000\nerror: hg::/tmp/hgrepo/ did not send all necessary objects\n\nTaylor\n"},{"id":"267477","messageId":"CAGZ79kawh0himmR+DuvcQB0O1rRVBhkg9ycCLvPdbp1m0sHKtQ@mail.gmail.com","threadId":"40014","inReplyTo":"CAKfKJYuuO+eak-L2SUVUEmoOj16bgV6LL0S=g-LzFjTxZUcRzQ@mail.gmail.com","subject":"Re: fetching from an hg remote fails with bare git repositories","fromName":"Stefan Beller","fromEmail":"sbeller@google.com","sentAt":"2015-08-04T18:56:47Z","receivedAt":"2015-08-04T18:56:47Z","isPatch":false,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"On Tue, Aug 4, 2015 at 10:45 AM, Taylor Braun-Jones\n<taylor@braun-jones.org> wrote:\n> Fetching from an hg remote fails with bare git repositories. Non-bare\n> repositories work fine.\n>\n> Steps to reproduce:\n>\n> mkdir /tmp/hgrepo\n> cd /tmp/hgrepo\n> hg init\n> echo foo > foo.txt\n> hg add foo.txt\n> hg commit -m \"add foo.txt\" foo.txt\n> git clone hg::/tmp/hgrepo/ /tmp/gitrepo\n> cd /tmp/gitrepo/\n> git fetch # WORKS\n> git clone --bare hg::/tmp/hgrepo/ /tmp/gitrepo.git\n> cd /tmp/gitrepo.git/\n> git fetch # FAILS\n>\n> The error message from the last line is:\n>\n> fatal: bad object 0000000000000000000000000000000000000000\n> error: hg::/tmp/hgrepo/ did not send all necessary objects\n>\n> Taylor\n\nWhich version of git did you test this with? Does it also happen on\nthe latest version?\n\n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n"},{"id":"267480","messageId":"CAKfKJYshy58eQMXTusUTf0dc2B7uVU+=rzdSicSG0JAuODSBug@mail.gmail.com","threadId":"40014","inReplyTo":"CAGZ79kawh0himmR+DuvcQB0O1rRVBhkg9ycCLvPdbp1m0sHKtQ@mail.gmail.com","subject":"Re: fetching from an hg remote fails with bare git repositories","fromName":"Taylor Braun-Jones","fromEmail":"taylor@braun-jones.org","sentAt":"2015-08-04T21:27:13Z","receivedAt":"2015-08-04T21:27:13Z","isPatch":false,"sender":{"key":"taylor@braun-jones.org","avatar":"https://gravatar.com/avatar/91c2af014ddf9c0cb1aa6401f22d7b210d1be6df84e17997031e4994570dcdf9?d=mp&s=160"},"body":"On Tue, Aug 4, 2015 at 2:56 PM, Stefan Beller <sbeller@google.com> wrote:\n> On Tue, Aug 4, 2015 at 10:45 AM, Taylor Braun-Jones\n> <taylor@braun-jones.org> wrote:\n>> Fetching from an hg remote fails with bare git repositories. Non-bare\n>> repositories work fine.\n>>\n>> Steps to reproduce:\n>>\n>> mkdir /tmp/hgrepo\n>> cd /tmp/hgrepo\n>> hg init\n>> echo foo > foo.txt\n>> hg add foo.txt\n>> hg commit -m \"add foo.txt\" foo.txt\n>> git clone hg::/tmp/hgrepo/ /tmp/gitrepo\n>> cd /tmp/gitrepo/\n>> git fetch # WORKS\n>> git clone --bare hg::/tmp/hgrepo/ /tmp/gitrepo.git\n>> cd /tmp/gitrepo.git/\n>> git fetch # FAILS\n>>\n>> The error message from the last line is:\n>>\n>> fatal: bad object 0000000000000000000000000000000000000000\n>> error: hg::/tmp/hgrepo/ did not send all necessary objects\n>>\n>> Taylor\n>\n> Which version of git did you test this with? Does it also happen on\n> the latest version?\n\nSorry - forgot that detail. This is using git 2.1.4 from Ubuntu 15.04\nx86_64. I haven't tried the latest version of git yet.\n"},{"id":"267489","messageId":"20150804230359.GA27965@glandium.org","threadId":"40014","inReplyTo":"CAKfKJYshy58eQMXTusUTf0dc2B7uVU+=rzdSicSG0JAuODSBug@mail.gmail.com","subject":"Re: fetching from an hg remote fails with bare git repositories","fromName":"Mike Hommey","fromEmail":"mh@glandium.org","sentAt":"2015-08-04T23:03:59Z","receivedAt":"2015-08-04T23:03:59Z","isPatch":false,"sender":{"key":"mh@glandium.org","avatar":"https://avatars.githubusercontent.com/u/1038527?v=4"},"body":"On Tue, Aug 04, 2015 at 05:27:13PM -0400, Taylor Braun-Jones wrote:\n> On Tue, Aug 4, 2015 at 2:56 PM, Stefan Beller <sbeller@google.com> wrote:\n> > On Tue, Aug 4, 2015 at 10:45 AM, Taylor Braun-Jones\n> > <taylor@braun-jones.org> wrote:\n> >> Fetching from an hg remote fails with bare git repositories. Non-bare\n> >> repositories work fine.\n> >>\n> >> Steps to reproduce:\n> >>\n> >> mkdir /tmp/hgrepo\n> >> cd /tmp/hgrepo\n> >> hg init\n> >> echo foo > foo.txt\n> >> hg add foo.txt\n> >> hg commit -m \"add foo.txt\" foo.txt\n> >> git clone hg::/tmp/hgrepo/ /tmp/gitrepo\n> >> cd /tmp/gitrepo/\n> >> git fetch # WORKS\n> >> git clone --bare hg::/tmp/hgrepo/ /tmp/gitrepo.git\n> >> cd /tmp/gitrepo.git/\n> >> git fetch # FAILS\n> >>\n> >> The error message from the last line is:\n> >>\n> >> fatal: bad object 0000000000000000000000000000000000000000\n> >> error: hg::/tmp/hgrepo/ did not send all necessary objects\n> >>\n> >> Taylor\n> >\n> > Which version of git did you test this with? Does it also happen on\n> > the latest version?\n> \n> Sorry - forgot that detail. This is using git 2.1.4 from Ubuntu 15.04\n> x86_64. I haven't tried the latest version of git yet.\n\nAnother missing detail is what you're using for mercurial support in\ngit. I would guess https://github.com/felipec/git-remote-hg. Shameless\nplug, you may want to give a try to\nhttps://github.com/glandium/git-cinnabar.\n\nAnyways, your error looks like what I fixed in 33cae54, which git\ndescribe tells me made it to git 2.3.2.\n\nMike\n"},{"id":"267576","messageId":"CAKfKJYtujyEBH4JhTyt=PzZbpB-iYhi=h5FbjAM2j9cuDGh1Hw@mail.gmail.com","threadId":"40014","inReplyTo":"20150804230359.GA27965@glandium.org","subject":"Re: fetching from an hg remote fails with bare git repositories","fromName":"Taylor Braun-Jones","fromEmail":"taylor@braun-jones.org","sentAt":"2015-08-06T18:21:01Z","receivedAt":"2015-08-06T18:21:01Z","isPatch":false,"sender":{"key":"taylor@braun-jones.org","avatar":"https://gravatar.com/avatar/91c2af014ddf9c0cb1aa6401f22d7b210d1be6df84e17997031e4994570dcdf9?d=mp&s=160"},"body":"On Tue, Aug 4, 2015 at 7:03 PM, Mike Hommey <mh@glandium.org> wrote:\n> Another missing detail is what you're using for mercurial support in\n> git. I would guess https://github.com/felipec/git-remote-hg.\n\nYes. I was going off some outdated information on the web that told me\nthe felipec/git-remote-hg had moved to mainline git. I now see that\nhas been undone.\n\n> Shameless plug, you may want to give a try to\n> https://github.com/glandium/git-cinnabar.\n\nThanks, I'll keep an eye on the project for support for pushing merge\ncommits. That missing feature is a show-stopper for me right now.\nSince git-cinnabar is not doing a full hg clone under the hood, is\nthere a chance that it will support shallow clones? (even before the\nnative hg client has this feature...)\n\n> Anyways, your error looks like what I fixed in 33cae54, which git\n> describe tells me made it to git 2.3.2.\n\nYep, grabbing the latest version of git (2.5.0) solved the problem.\nSorry for the bother.\n\nTaylor\n"}]}