git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* fetching from an hg remote fails with bare git repositories
@ 2015-08-04 17:45 Taylor Braun-Jones
  2015-08-04 18:56 ` Stefan Beller
  0 siblings, 1 reply; 5+ messages in thread
From: Taylor Braun-Jones @ 2015-08-04 17:45 UTC (permalink / raw)
  To: git

Fetching from an hg remote fails with bare git repositories. Non-bare
repositories work fine.

Steps to reproduce:

mkdir /tmp/hgrepo
cd /tmp/hgrepo
hg init
echo foo > foo.txt
hg add foo.txt
hg commit -m "add foo.txt" foo.txt
git clone hg::/tmp/hgrepo/ /tmp/gitrepo
cd /tmp/gitrepo/
git fetch # WORKS
git clone --bare hg::/tmp/hgrepo/ /tmp/gitrepo.git
cd /tmp/gitrepo.git/
git fetch # FAILS

The error message from the last line is:

fatal: bad object 0000000000000000000000000000000000000000
error: hg::/tmp/hgrepo/ did not send all necessary objects

Taylor

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: fetching from an hg remote fails with bare git repositories
  2015-08-04 17:45 fetching from an hg remote fails with bare git repositories Taylor Braun-Jones
@ 2015-08-04 18:56 ` Stefan Beller
  2015-08-04 21:27   ` Taylor Braun-Jones
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Beller @ 2015-08-04 18:56 UTC (permalink / raw)
  To: Taylor Braun-Jones; +Cc: git

On Tue, Aug 4, 2015 at 10:45 AM, Taylor Braun-Jones
<taylor@braun-jones.org> wrote:
> Fetching from an hg remote fails with bare git repositories. Non-bare
> repositories work fine.
>
> Steps to reproduce:
>
> mkdir /tmp/hgrepo
> cd /tmp/hgrepo
> hg init
> echo foo > foo.txt
> hg add foo.txt
> hg commit -m "add foo.txt" foo.txt
> git clone hg::/tmp/hgrepo/ /tmp/gitrepo
> cd /tmp/gitrepo/
> git fetch # WORKS
> git clone --bare hg::/tmp/hgrepo/ /tmp/gitrepo.git
> cd /tmp/gitrepo.git/
> git fetch # FAILS
>
> The error message from the last line is:
>
> fatal: bad object 0000000000000000000000000000000000000000
> error: hg::/tmp/hgrepo/ did not send all necessary objects
>
> Taylor

Which version of git did you test this with? Does it also happen on
the latest version?

> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: fetching from an hg remote fails with bare git repositories
  2015-08-04 18:56 ` Stefan Beller
@ 2015-08-04 21:27   ` Taylor Braun-Jones
  2015-08-04 23:03     ` Mike Hommey
  0 siblings, 1 reply; 5+ messages in thread
From: Taylor Braun-Jones @ 2015-08-04 21:27 UTC (permalink / raw)
  To: Stefan Beller; +Cc: git

On Tue, Aug 4, 2015 at 2:56 PM, Stefan Beller <sbeller@google.com> wrote:
> On Tue, Aug 4, 2015 at 10:45 AM, Taylor Braun-Jones
> <taylor@braun-jones.org> wrote:
>> Fetching from an hg remote fails with bare git repositories. Non-bare
>> repositories work fine.
>>
>> Steps to reproduce:
>>
>> mkdir /tmp/hgrepo
>> cd /tmp/hgrepo
>> hg init
>> echo foo > foo.txt
>> hg add foo.txt
>> hg commit -m "add foo.txt" foo.txt
>> git clone hg::/tmp/hgrepo/ /tmp/gitrepo
>> cd /tmp/gitrepo/
>> git fetch # WORKS
>> git clone --bare hg::/tmp/hgrepo/ /tmp/gitrepo.git
>> cd /tmp/gitrepo.git/
>> git fetch # FAILS
>>
>> The error message from the last line is:
>>
>> fatal: bad object 0000000000000000000000000000000000000000
>> error: hg::/tmp/hgrepo/ did not send all necessary objects
>>
>> Taylor
>
> Which version of git did you test this with? Does it also happen on
> the latest version?

Sorry - forgot that detail. This is using git 2.1.4 from Ubuntu 15.04
x86_64. I haven't tried the latest version of git yet.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: fetching from an hg remote fails with bare git repositories
  2015-08-04 21:27   ` Taylor Braun-Jones
@ 2015-08-04 23:03     ` Mike Hommey
  2015-08-06 18:21       ` Taylor Braun-Jones
  0 siblings, 1 reply; 5+ messages in thread
From: Mike Hommey @ 2015-08-04 23:03 UTC (permalink / raw)
  To: Taylor Braun-Jones; +Cc: Stefan Beller, git

On Tue, Aug 04, 2015 at 05:27:13PM -0400, Taylor Braun-Jones wrote:
> On Tue, Aug 4, 2015 at 2:56 PM, Stefan Beller <sbeller@google.com> wrote:
> > On Tue, Aug 4, 2015 at 10:45 AM, Taylor Braun-Jones
> > <taylor@braun-jones.org> wrote:
> >> Fetching from an hg remote fails with bare git repositories. Non-bare
> >> repositories work fine.
> >>
> >> Steps to reproduce:
> >>
> >> mkdir /tmp/hgrepo
> >> cd /tmp/hgrepo
> >> hg init
> >> echo foo > foo.txt
> >> hg add foo.txt
> >> hg commit -m "add foo.txt" foo.txt
> >> git clone hg::/tmp/hgrepo/ /tmp/gitrepo
> >> cd /tmp/gitrepo/
> >> git fetch # WORKS
> >> git clone --bare hg::/tmp/hgrepo/ /tmp/gitrepo.git
> >> cd /tmp/gitrepo.git/
> >> git fetch # FAILS
> >>
> >> The error message from the last line is:
> >>
> >> fatal: bad object 0000000000000000000000000000000000000000
> >> error: hg::/tmp/hgrepo/ did not send all necessary objects
> >>
> >> Taylor
> >
> > Which version of git did you test this with? Does it also happen on
> > the latest version?
> 
> Sorry - forgot that detail. This is using git 2.1.4 from Ubuntu 15.04
> x86_64. I haven't tried the latest version of git yet.

Another missing detail is what you're using for mercurial support in
git. I would guess https://github.com/felipec/git-remote-hg. Shameless
plug, you may want to give a try to
https://github.com/glandium/git-cinnabar.

Anyways, your error looks like what I fixed in 33cae54, which git
describe tells me made it to git 2.3.2.

Mike

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: fetching from an hg remote fails with bare git repositories
  2015-08-04 23:03     ` Mike Hommey
@ 2015-08-06 18:21       ` Taylor Braun-Jones
  0 siblings, 0 replies; 5+ messages in thread
From: Taylor Braun-Jones @ 2015-08-06 18:21 UTC (permalink / raw)
  To: Mike Hommey; +Cc: Stefan Beller, git

On Tue, Aug 4, 2015 at 7:03 PM, Mike Hommey <mh@glandium.org> wrote:
> Another missing detail is what you're using for mercurial support in
> git. I would guess https://github.com/felipec/git-remote-hg.

Yes. I was going off some outdated information on the web that told me
the felipec/git-remote-hg had moved to mainline git. I now see that
has been undone.

> Shameless plug, you may want to give a try to
> https://github.com/glandium/git-cinnabar.

Thanks, I'll keep an eye on the project for support for pushing merge
commits. That missing feature is a show-stopper for me right now.
Since git-cinnabar is not doing a full hg clone under the hood, is
there a chance that it will support shallow clones? (even before the
native hg client has this feature...)

> Anyways, your error looks like what I fixed in 33cae54, which git
> describe tells me made it to git 2.3.2.

Yep, grabbing the latest version of git (2.5.0) solved the problem.
Sorry for the bother.

Taylor

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-08-06 18:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-04 17:45 fetching from an hg remote fails with bare git repositories Taylor Braun-Jones
2015-08-04 18:56 ` Stefan Beller
2015-08-04 21:27   ` Taylor Braun-Jones
2015-08-04 23:03     ` Mike Hommey
2015-08-06 18:21       ` Taylor Braun-Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).