forgejo-contrib/forgejo-cli
20
407
Fork
You've already forked forgejo-cli
51

Update Rust crate git2 to 0.21.0 #467

Merged
Cyborus merged 2 commits from renovate/git2-0.x into main 2026年05月20日 03:00:30 +02:00

This PR contains the following updates:

Package Type Update Change
git2 dependencies minor 0.20.10.21.0

Release Notes

rust-lang/git2-rs (git2)

v0.21.0

Compare Source

0.20.4...main

Added
  • Added experimental SHA256 repository support behind the new unstable-sha256 Cargo feature,
    along with *_ext API variants that accept an ObjectFormat.
    #​1206
  • Added opts::set_cache_max_size() and opts::get_cached_memory().
    #​1188
  • Added Repository::object_format() and a new ObjectFormat enum.
    #​1204
  • Added Repository::set_config().
    #​1208
  • Added merge_file() along with MergeFileInput.
    #​1210
  • Added Repository::refdb_compress() for packing loose refs.
    #​1221
  • Added public Refdb type, along with Repository::refdb() and Repository::set_refdb(). Repository::refdb_compress() now delegates to Refdb::compress().
    #​1228
  • Added Revspec::into_objects().
    #​1230
  • Added BlameHunk::final_committer(), BlameHunk::orig_committer(), BlameHunk::summary(), and BlameHunk::summary_bytes().
    #​1231
  • Implemented Clone for Reference.
    #​1233
  • Added Repository::author_from_env() and Repository::committer_from_env().
    #​1237
  • Added impl From<Utf8Error> for Error.
    #​1239
Changed
  • The ssh, https, and cred Cargo features are no longer enabled by default.
    Previously default = ["ssh", "https"]; now default = [].
    Enable them explicitly if you rely on credential helpers or transport support.
    #​1168
  • CredentialHelper and the url dependency are now gated behind the new cred Cargo feature.
    Enabling ssh or https transitively enables cred.
    #​1168
  • Updated to the 2021 edition.
    #​1173
  • Many string accessors that previously returned Option<&str>
    now return Result<&str, Error> or Result<Option<&str>, Error>,
    so callers can distinguish a missing value from a non-UTF-8 one.
    #​1241
  • BlameHunk::final_signature, BlameHunk::final_committer, BlameHunk::orig_signature, and BlameHunk::orig_committer
    now return Option to avoid segfaults when signature information is missing.
    #​1254
  • Bumped requirement to libgit2-sys 0.18.4, which updates libgit2 to 1.9.3.
    #​1242
Fixed
  • Fixed MergeOptions::skip_reuc() to use the correct GIT_MERGE_SKIP_REUC flag.
    #​1194
  • Repository::submodules() now returns an Error when the underlying git_submodule_lookup() call to libgit2 fails, rather than panicking with a failed assertion.
    #​1220
  • Reference::is_valid_name() now propagates errors from CString conversion instead of panicking.
    #​1229
  • Fixed Remote::list() to return an empty list instead of erroring
    when the remote advertises no refs.
    #​1250
  • ReferenceNames now returns an Err for non-UTF-8 branch names instead of panicking.
    #​1239
Documentation
  • Added note regarding potentially confusing behavior of git_checkout_head.
    #​1149
  • Added comments describing the IndexAddOption flags.
    #​1163
  • Updated README note about the ssh feature.
    #​1187
  • Improved function docs for Repository::tag_foreach().
    #​1190
  • Fixed doc comment typo in StatusOptions.
    #​1199
  • Fixed missing period in module documentation.
    #​1219
  • Small wording fix in Signature::from_raw_const() docs.
    #​1222
  • Replaced discussion of missing gist in README.
    #​1223
  • Documented the bitflag methods for checking flags.
    #​1224
  • Clarified CheckoutBuilder::update_index() documentation.
    #​1232
  • Added more missing documentation.
    #​1235
  • Fixed typo in Repository::stash_save_ext() docs.
    #​1245
  • Added example showing retrieval of the latest commit for a file.
    #​1243
  • Replaced comma with period in CheckoutBuilder::refresh() docs.
    #​1252
Internals
  • Dropped civet/conduit from dev-dependencies.
    #​1170
  • Updated dependencies.
    #​1171
  • Fixed lockfile verification in CI.
    #​1177
  • Updated CI and documentation to cover feature combinations.
    #​1182
  • Listed all examples that may need HTTP and SSH.
    #​1196
  • Allowed publishing from any ref in the publish workflow.
    #​1198
  • Bumped time from 0.3.41 to 0.3.47.
    #​1215
  • Added end-to-end test for branch name on initialization.
    #​1244
  • Added end-to-end test for stash count.
    #​1246
  • Added end-to-end tests demonstrating use of Repository::statuses().
    #​1251
  • Internal refactors preparing for experimental SHA256 OID support.
    #​1201
    #​1205

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • Between 12:00 AM and 03:59 AM (* 0-3 * * *)
  • Automerge
    • Between 12:00 AM and 03:59 AM (* 0-3 * * *)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate.

This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [git2](https://github.com/rust-lang/git2-rs) | dependencies | minor | `0.20.1` → `0.21.0` | --- ### Release Notes <details> <summary>rust-lang/git2-rs (git2)</summary> ### [`v0.21.0`](https://github.com/rust-lang/git2-rs/blob/HEAD/CHANGELOG.md#0210---TBD) [Compare Source](https://github.com/rust-lang/git2-rs/compare/git2-0.20.4...git2-0.21.0) [0.20.4...main](https://github.com/rust-lang/git2-rs/compare/git2-0.20.4...main) ##### Added - Added experimental SHA256 repository support behind the new `unstable-sha256` Cargo feature, along with `*_ext` API variants that accept an `ObjectFormat`. [#&#8203;1206](https://github.com/rust-lang/git2-rs/pull/1206) - Added `opts::set_cache_max_size()` and `opts::get_cached_memory()`. [#&#8203;1188](https://github.com/rust-lang/git2-rs/pull/1188) - Added `Repository::object_format()` and a new `ObjectFormat` enum. [#&#8203;1204](https://github.com/rust-lang/git2-rs/pull/1204) - Added `Repository::set_config()`. [#&#8203;1208](https://github.com/rust-lang/git2-rs/pull/1208) - Added `merge_file()` along with `MergeFileInput`. [#&#8203;1210](https://github.com/rust-lang/git2-rs/pull/1210) - Added `Repository::refdb_compress()` for packing loose refs. [#&#8203;1221](https://github.com/rust-lang/git2-rs/pull/1221) - Added public `Refdb` type, along with `Repository::refdb()` and `Repository::set_refdb()`. `Repository::refdb_compress()` now delegates to `Refdb::compress()`. [#&#8203;1228](https://github.com/rust-lang/git2-rs/pull/1228) - Added `Revspec::into_objects()`. [#&#8203;1230](https://github.com/rust-lang/git2-rs/pull/1230) - Added `BlameHunk::final_committer()`, `BlameHunk::orig_committer()`, `BlameHunk::summary()`, and `BlameHunk::summary_bytes()`. [#&#8203;1231](https://github.com/rust-lang/git2-rs/pull/1231) - Implemented `Clone` for `Reference`. [#&#8203;1233](https://github.com/rust-lang/git2-rs/pull/1233) - Added `Repository::author_from_env()` and `Repository::committer_from_env()`. [#&#8203;1237](https://github.com/rust-lang/git2-rs/pull/1237) - Added `impl From<Utf8Error> for Error`. [#&#8203;1239](https://github.com/rust-lang/git2-rs/pull/1239) ##### Changed - ❗ The `ssh`, `https`, and `cred` Cargo features are no longer enabled by default. Previously `default = ["ssh", "https"]`; now `default = []`. Enable them explicitly if you rely on credential helpers or transport support. [#&#8203;1168](https://github.com/rust-lang/git2-rs/pull/1168) - ❗ `CredentialHelper` and the `url` dependency are now gated behind the new `cred` Cargo feature. Enabling `ssh` or `https` transitively enables `cred`. [#&#8203;1168](https://github.com/rust-lang/git2-rs/pull/1168) - ❗ Updated to the 2021 edition. [#&#8203;1173](https://github.com/rust-lang/git2-rs/pull/1173) - ❗ Many string accessors that previously returned `Option<&str>` now return `Result<&str, Error>` or `Result<Option<&str>, Error>`, so callers can distinguish a missing value from a non-UTF-8 one. [#&#8203;1241](https://github.com/rust-lang/git2-rs/pull/1241) - ❗ `BlameHunk::final_signature`, `BlameHunk::final_committer`, `BlameHunk::orig_signature`, and `BlameHunk::orig_committer` now return `Option` to avoid segfaults when signature information is missing. [#&#8203;1254](https://github.com/rust-lang/git2-rs/pull/1254) - Bumped requirement to libgit2-sys 0.18.4, which updates libgit2 to 1.9.3. [#&#8203;1242](https://github.com/rust-lang/git2-rs/pull/1242) ##### Fixed - Fixed `MergeOptions::skip_reuc()` to use the correct `GIT_MERGE_SKIP_REUC` flag. [#&#8203;1194](https://github.com/rust-lang/git2-rs/pull/1194) - `Repository::submodules()` now returns an `Error` when the underlying `git_submodule_lookup()` call to libgit2 fails, rather than panicking with a failed assertion. [#&#8203;1220](https://github.com/rust-lang/git2-rs/pull/1220) - `Reference::is_valid_name()` now propagates errors from `CString` conversion instead of panicking. [#&#8203;1229](https://github.com/rust-lang/git2-rs/pull/1229) - Fixed `Remote::list()` to return an empty list instead of erroring when the remote advertises no refs. [#&#8203;1250](https://github.com/rust-lang/git2-rs/pull/1250) - `ReferenceNames` now returns an `Err` for non-UTF-8 branch names instead of panicking. [#&#8203;1239](https://github.com/rust-lang/git2-rs/pull/1239) ##### Documentation - Added note regarding potentially confusing behavior of `git_checkout_head`. [#&#8203;1149](https://github.com/rust-lang/git2-rs/pull/1149) - Added comments describing the `IndexAddOption` flags. [#&#8203;1163](https://github.com/rust-lang/git2-rs/pull/1163) - Updated README note about the `ssh` feature. [#&#8203;1187](https://github.com/rust-lang/git2-rs/pull/1187) - Improved function docs for `Repository::tag_foreach()`. [#&#8203;1190](https://github.com/rust-lang/git2-rs/pull/1190) - Fixed doc comment typo in `StatusOptions`. [#&#8203;1199](https://github.com/rust-lang/git2-rs/pull/1199) - Fixed missing period in module documentation. [#&#8203;1219](https://github.com/rust-lang/git2-rs/pull/1219) - Small wording fix in `Signature::from_raw_const()` docs. [#&#8203;1222](https://github.com/rust-lang/git2-rs/pull/1222) - Replaced discussion of missing gist in README. [#&#8203;1223](https://github.com/rust-lang/git2-rs/pull/1223) - Documented the bitflag methods for checking flags. [#&#8203;1224](https://github.com/rust-lang/git2-rs/pull/1224) - Clarified `CheckoutBuilder::update_index()` documentation. [#&#8203;1232](https://github.com/rust-lang/git2-rs/pull/1232) - Added more missing documentation. [#&#8203;1235](https://github.com/rust-lang/git2-rs/pull/1235) - Fixed typo in `Repository::stash_save_ext()` docs. [#&#8203;1245](https://github.com/rust-lang/git2-rs/pull/1245) - Added example showing retrieval of the latest commit for a file. [#&#8203;1243](https://github.com/rust-lang/git2-rs/pull/1243) - Replaced comma with period in `CheckoutBuilder::refresh()` docs. [#&#8203;1252](https://github.com/rust-lang/git2-rs/pull/1252) ##### Internals - Dropped `civet`/`conduit` from dev-dependencies. [#&#8203;1170](https://github.com/rust-lang/git2-rs/pull/1170) - Updated dependencies. [#&#8203;1171](https://github.com/rust-lang/git2-rs/pull/1171) - Fixed lockfile verification in CI. [#&#8203;1177](https://github.com/rust-lang/git2-rs/pull/1177) - Updated CI and documentation to cover feature combinations. [#&#8203;1182](https://github.com/rust-lang/git2-rs/pull/1182) - Listed all examples that may need HTTP and SSH. [#&#8203;1196](https://github.com/rust-lang/git2-rs/pull/1196) - Allowed publishing from any ref in the publish workflow. [#&#8203;1198](https://github.com/rust-lang/git2-rs/pull/1198) - Bumped `time` from 0.3.41 to 0.3.47. [#&#8203;1215](https://github.com/rust-lang/git2-rs/pull/1215) - Added end-to-end test for branch name on initialization. [#&#8203;1244](https://github.com/rust-lang/git2-rs/pull/1244) - Added end-to-end test for stash count. [#&#8203;1246](https://github.com/rust-lang/git2-rs/pull/1246) - Added end-to-end tests demonstrating use of `Repository::statuses()`. [#&#8203;1251](https://github.com/rust-lang/git2-rs/pull/1251) - Internal refactors preparing for experimental SHA256 OID support. [#&#8203;1201](https://github.com/rust-lang/git2-rs/pull/1201) [#&#8203;1205](https://github.com/rust-lang/git2-rs/pull/1205) </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - Between 12:00 AM and 03:59 AM (`* 0-3 * * *`) - Automerge - Between 12:00 AM and 03:59 AM (`* 0-3 * * *`) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xODIuMSIsInVwZGF0ZWRJblZlciI6IjQzLjE4Mi4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
Cyborus force-pushed renovate/git2-0.x from 3a3fc668d6
Some checks failed
ci/woodpecker/pr/check-typos Pipeline was successful
ci/woodpecker/pr/check Pipeline failed
to ff9e70c528
All checks were successful
ci/woodpecker/pr/check-typos Pipeline was successful
ci/woodpecker/pr/check Pipeline was successful
2026年05月20日 02:58:35 +02:00
Compare
Author
Member
Copy link

Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.

You can manually request rebase by checking the rebase/retry box above.

⚠️ Warning: custom changes will be lost.

### Edited/Blocked Notification Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR. You can manually request rebase by checking the rebase/retry box above. ⚠️ **Warning**: custom changes will be lost.
Cyborus deleted branch renovate/git2-0.x 2026年05月20日 03:00:32 +02:00
Sign in to join this conversation.
No reviewers
Labels
Clear labels
Kind/Breaking
Breaking change that won't be backward compatible
Kind/Bug
Something is not working
Kind/Design
Discussion about UI/UX design
Kind/Documentation
Documentation changes
Kind/Enhancement
Improve existing functionality
Kind/Feature
New functionality
Kind/Security
This is security issue
Kind/Testing
Issue or pull request related to testing
Kind/Upstream
This is an issue with upstream software (Forgejo) that is probably not our fault
Priority
Critical
The priority is critical
Priority
High
The priority is high
Priority
Low
The priority is low
Priority
Medium
The priority is medium
Reviewed
Confirmed
Issue has been confirmed
Reviewed
Duplicate
This issue or pull request already exists
Reviewed
Invalid
Invalid issue
Reviewed
Won't Fix
This issue won't be fixed
Status
Abandoned
Somebody has started to work on this but abandoned work
Status
Blocked
Something is blocking this issue or pull request
Status
Need More Info
Feedback is required to reproduce issue or to continue work
Suspicious
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
forgejo-contrib/forgejo-cli!467
Reference in a new issue
forgejo-contrib/forgejo-cli
No description provided.
Delete branch "renovate/git2-0.x"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?