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

Update to libgit2 0.28.2 #425

Merged
merged 1 commit into from
Jun 3, 2019
Merged

Conversation

cuviper
Copy link
Member

@cuviper cuviper commented May 31, 2019

ref: Upstream changelog

This includes a semver bump for all crates, as a few APIs have been
renamed in 0.28. Upstream provides deprecated.h aliases, if we'd like
to follow suit, but I feel it's better to just move forward.

  • giterr_* -> git_error_*
  • GITERR_* -> GIT_ERROR_*
  • git_otype -> git_object_t
  • GIT_OBJ_* -> GIT_OBJECT_*
  • git_ref_t -> git_reference_t
  • GIT_REF_* -> GIT_REFERENCE_*
  • git_idxentry_* -> git_index_entry_*
  • GIT_IDXENTRY_* -> GIT_INDEX_ENTRY_*
  • git_buf_free -> git_buf_dispose

Proxy support is now builtin to libgit2, so libcurl is no longer a
dependency at all. Proxies were also the reason for git2-curl to
exist, which seems to be unnecessary for a while now, since libgit2
used libcurl itself since 0.23 anyway. Maybe git2-curl can just be
retired now, but I've updated it just for the sake of compatibility.

The minimum pkg-config libgit2 is now documented and tested for 0.28.
While it previously claimed support for 0.25.1, this was broken by
git_config_entry's include_depth field, which was added after the
0.27 release branched.

This includes a semver bump for all crates, as a few APIs have been
renamed in 0.28. Upstream provides `deprecated.h` aliases, if we'd like
to follow suit, but I feel it's better to just move forward.

- `giterr_*` -> `git_error_*`
- `GITERR_*` -> `GIT_ERROR_*`
- `git_otype` -> `git_object_t`
- `GIT_OBJ_*` -> `GIT_OBJECT_*`
- `git_ref_t` -> `git_reference_t`
- `GIT_REF_*` -> `GIT_REFERENCE_*`
- `git_idxentry_*` -> `git_index_entry_*`
- `GIT_IDXENTRY_*` -> `GIT_INDEX_ENTRY_*`
- `git_buf_free` -> `git_buf_dispose`

Proxy support is now builtin to `libgit2`, so `libcurl` is no longer a
dependency at all. Proxies were also the reason for `git2-curl` to
exist, which seems to be unnecessary for a while now, since `libgit2`
used `libcurl` itself since 0.23 anyway. Maybe `git2-curl` can just be
retired now, but I've updated it just for the sake of compatibility.

The minimum pkg-config libgit2 is now documented and tested for 0.28.
While it previously claimed support for 0.25.1, this was broken by
`git_config_entry`'s `include_depth` field, which was added *after* the
0.27 release branched.
@ehuss
Copy link
Contributor

ehuss commented May 31, 2019

This looks great, thanks for doing this! I'll try to look at it closer sometime soon.

@alexcrichton Do you have any idea why the azure pipeline didn't launch? It was working before.
EDIT: Posted a new PR, and it seemed to work on it, strange!

@ehuss
Copy link
Contributor

ehuss commented Jun 2, 2019

I think git2-curl will still be needed by things like Cargo. Cargo performs a variety of configurations on the curl handle (certificate settings, user-agent, debugging, etc.), and those don't seem to have direct analogues in libgit2.

I've been testing this out a bit and I haven't found any problems.

@alexcrichton
Copy link
Member

Thanks for the @cuviper! Agreed with @ehuss that we do use the curl support for non-proxy stuff, but it's indeed minor (ish) compared to the proxy support which was critical at the time! In any case looks like this is all ship shape, so I'm gonna merge.

@alexcrichton alexcrichton merged commit d04a23f into rust-lang:master Jun 3, 2019
@alexcrichton
Copy link
Member

And now published on crates.io!

bors pushed a commit to rust-lang/cargo that referenced this pull request Jun 7, 2019
bors added a commit to rust-lang/cargo that referenced this pull request Jun 7, 2019
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

Successfully merging this pull request may close these issues.

3 participants