Skip to content

chore(deps): bump git2 from 0.20.4 to 0.21.0 - #68

Open
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/cargo/git2-0.21.0
Open

chore(deps): bump git2 from 0.20.4 to 0.21.0#68
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/cargo/git2-0.21.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Jun 2, 2026

Copy link
Copy Markdown
Contributor

Bumps git2 from 0.20.4 to 0.21.0.

Changelog

Sourced from git2's changelog.

0.21.0 - 2026-05-18

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.

... (truncated)

Commits
  • dffaf27 Merge pull request #1256 from weihanglo/changelog
  • 84b9c76 docs: changelog for git2@0.21
  • 8c6dc4a Merge pull request #1206 from weihanglo/sha256-git2
  • 7bd145e fix: import ObjectFormat in one place
  • fc8af6a test(oid): split _ext to test each format separately
  • b9bde87 test: oid length sanity check
  • 57a68e0 feat(oid): impl Display for ObjectFormat
  • 7acee09 chore(ci): test git2 sha256 support
  • bdf5b7b fix: init example with --object-format option
  • 9fb4e6a refactor(util): drop unsafe from zeroed_raw_oid
  • Additional commits viewable in compare view

@dependabot dependabot Bot added dependencies Pull requests that update a dependency file rust Pull requests that update rust code labels Jun 2, 2026
@dependabot
dependabot Bot requested a review from ReinaMacCredy as a code owner June 2, 2026 19:19
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file rust Pull requests that update rust code labels Jun 2, 2026
@dependabot
dependabot Bot force-pushed the dependabot/cargo/git2-0.21.0 branch from 86aa0ff to ed77644 Compare June 26, 2026 10:48

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ed7764499b

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread Cargo.toml
anyhow = "1"
clap = { version = "4.5", features = ["derive"] }
git2 = "0.20"
git2 = "0.21"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Update git2 call sites for 0.21 API

In git2 0.21, Reference::shorthand() returns Result<&str, Error> instead of Option<&str>; this repo still has branch_name returning Ok(reference.shorthand().map(str::to_string)) in src/foundation/core/git.rs:202, so enabling git2 = "0.21" makes all builds fail with a type mismatch until that call is changed to handle the new Result.

Useful? React with 👍 / 👎.

Bumps [git2](https://github.com/rust-lang/git2-rs) from 0.20.4 to 0.21.0.
- [Changelog](https://github.com/rust-lang/git2-rs/blob/main/CHANGELOG.md)
- [Commits](rust-lang/git2-rs@git2-0.20.4...git2-0.21.0)

---
updated-dependencies:
- dependency-name: git2
  dependency-version: 0.21.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot
dependabot Bot force-pushed the dependabot/cargo/git2-0.21.0 branch from ed77644 to fd0929f Compare July 1, 2026 15:57

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fd0929f710

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread Cargo.toml
anyhow = "1"
clap = { version = "4.5", features = ["derive"] }
git2 = "0.20"
git2 = "0.21"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Update status path call sites for git2 0.21

With this dependency bump, git2::StatusEntry::path() now returns Result<&str, git2::Error> rather than Option<&str>. The existing uses in src/foundation/core/git.rs still pattern-match Some/None in repo_files and dirty_counts (for example lines 202 and 375), so builds will fail once this git2 = "0.21" dependency is resolved; update those call sites to handle the Result as part of the bump.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file rust Pull requests that update rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants