Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to open Version 1 repositories #546

Closed
casey opened this issue Apr 12, 2020 · 3 comments
Closed

Unable to open Version 1 repositories #546

casey opened this issue Apr 12, 2020 · 3 comments

Comments

@casey
Copy link

casey commented Apr 12, 2020

I get this error when trying to open version 1 git repositories:

unsupported repository version 1. Only versions up to 0 are supported.; class=Repository (6)

I tried using git2 from github:

[dependencies.git2]
git = "https://github.com/rust-lang/git2-rs.git"

I thought that perhaps this would work, since I saw that libgit2 added support for V1 repos on Feb 6th:

libgit2/libgit2@06f0230

And that the version was bumped to 1.0 on March 28th:

libgit2/libgit2@274b2a0

So I thought that git2 from master would support V1 repos. Cargo tree shows the following:

├── git2 v0.13.2 (git+https://github.com/rust-lang/git2-rs.git#c42e8e964b99e193ec3e64619c2be34f262ea0c2)
│   ├── libgit2-sys v0.12.3+1.0.0 (git+https://github.com/rust-lang/git2-rs.git#c42e8e964b99e193ec3e64

So it looks like it's using the correct version from master.

Is there anything additional needed to enable support for V1 repos?

And for reference, the repo I'm trying to use is this one.

@alexcrichton
Copy link
Member

It may be the case that commit wasn't included in the 1.0 release? I'm honestly not entirely sure. This may be a better question for libgit2 itself?

@ehuss
Copy link
Contributor

ehuss commented Apr 13, 2020

I tried cargo run --example clone https://fuchsia.googlesource.com/fuchsia fucshia and I got a zlib error:

error: error reading from the zlib stream; class=Zlib (5)9425) / chk 0% ( 0/ 0)

Cloning that repo with the git cli, it indicates it is version 0, so I'm not sure why you got a version error. Is the version error maybe misleading to some other problem?

@casey
Copy link
Author

casey commented Apr 15, 2020

It may be the case that commit wasn't included in the 1.0 release? I'm honestly not entirely sure. This may be a better question for libgit2 itself?

I just tried out v1 of libgit2 (commit 7d3c7057f0e774aecd6fc4ef8333e69e5c4873e0) from a simple C program, and I got the same error. I think I was looking a commit that bumbed the libgit2 version number to 1 in a constant, and not the actual release commit, and that you're right and this didn't actually make it into libgit2 v1.0.

Sorry for the spurious issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants