Skip to content

fix: adjust custom err from cert-check due to libgit2 1.8 change - #13970

Merged
bors merged 1 commit into
rust-lang:masterfrom
weihanglo:libgit2@1.8.0
May 31, 2024
Merged

fix: adjust custom err from cert-check due to libgit2 1.8 change#13970
bors merged 1 commit into
rust-lang:masterfrom
weihanglo:libgit2@1.8.0

Conversation

@weihanglo

Copy link
Copy Markdown
Member

What does this PR try to resolve?

libgit2 disallows overriding errors from certificate check since v1.8.0,
so we store the error additionally and unwrap it later.

How should we test and review this PR?

I believe it is due to this change: libgit2/libgit2@9a9f220

Actually, in the doc of git_error_set it does state that the custom message might be overridden by libgit2 internals.

I am not sure if this should be fixed in upstream libgit2 or by our own,
but it's better to do it now then waiting for libgit2 1.8.2

Additional information

r? ehuss

@rustbot rustbot added A-git Area: anything dealing with git S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 28, 2024
libgit2 disallows overriding errors from certificate check since v1.8.0,
so we store the error additionally and unwrap it later.

See libgit2/libgit2@9a9f220
@weihanglo

Copy link
Copy Markdown
Member Author

This commit shows that the code change are compatible with both libgit2 1.7 and 1.8: aa2ad97. I believe this is good to merge now without waiting for a new git2-rs release.

@weihanglo
weihanglo marked this pull request as ready for review May 31, 2024 04:42
@ehuss

ehuss commented May 31, 2024

Copy link
Copy Markdown
Contributor

Yea, it was a little precarious how the error was getting shuttled around. Thank you very much for looking into this and getting it fixed!

@bors r+

@bors

bors commented May 31, 2024

Copy link
Copy Markdown
Contributor

📌 Commit 0978162 has been approved by ehuss

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 31, 2024
@bors

bors commented May 31, 2024

Copy link
Copy Markdown
Contributor

⌛ Testing commit 0978162 with merge ef56deb...

@bors

bors commented May 31, 2024

Copy link
Copy Markdown
Contributor

☀️ Test successful - checks-actions
Approved by: ehuss
Pushing ef56deb to master...

@bors
bors merged commit ef56deb into rust-lang:master May 31, 2024
@weihanglo
weihanglo deleted the libgit2@1.8.0 branch May 31, 2024 16:08
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 1, 2024
Update cargo

9 commits in 431db31d0dbeda320caf8ef8535ea48eb3093407..7a6fad0984d28c8330974636972aa296b67c4513
2024-05-28 18:17:31 +0000 to 2024-05-31 22:26:03 +0000
- fix(config): Ensure `--config net.git-fetch-with-cli=true` is respected (rust-lang/cargo#13992)
- Fix libcurl proxy documentation link (rust-lang/cargo#13990)
- fix(new): Dont say were adding to a workspace when a regular package is in root (rust-lang/cargo#13987)
- fix: adjust custom err from cert-check due to libgit2 1.8 change (rust-lang/cargo#13970)
- fix(toml): Ensure targets are in a deterministic order (rust-lang/cargo#13989)
- doc(cargo-package): explain no guarantee of vcs provenance (rust-lang/cargo#13984)
- chore: fix some comments (rust-lang/cargo#13982)
- feat: stabilize `cargo update --precise <yanked>` (rust-lang/cargo#13974)
- Update openssl-src to 111.28.2+1.1.1w (rust-lang/cargo#13976)

r? ghost
@rustbot rustbot added this to the 1.80.0 milestone Jun 1, 2024
ehuss added a commit to ehuss/cargo that referenced this pull request Jan 4, 2025
This no longer generates the same error message for the same reason that
it changed for linux in rust-lang#13970.

Note that Windows does things slightly differently, and doesn't need
adjustment.
github-merge-queue Bot pushed a commit that referenced this pull request Jan 4, 2025
This no longer generates the same error message for the same reason that
it changed for linux in #13970.

Note that Windows does things slightly differently, and doesn't need
adjustment.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-git Area: anything dealing with git S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants