fix(deps): update git2 to 0.21#337
Merged
Merged
Conversation
git2 0.21 changed many string accessors from `Option<&str>` to `Result<&str, Error>` / `Result<Option<&str>, Error>` so callers can distinguish a missing value from a non-UTF-8 one. Adapt the call sites with `.ok()` / `.ok().flatten()` to preserve existing behavior; non-UTF-8 branch/commit names aren't a meaningful case for this tool's domain. Also drop the `ssh`/`https`/`cred` default features (no longer default upstream) since this crate only uses git2 for local operations, and replace deprecated `Oid::zero()` with the `Oid::ZERO_SHA1` constant. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
gg-coreandgg-mcp.Option<&str>toResult<&str, Error>/Result<Option<&str>, Error>(see git2-rs#1241); update ~11 call sites with.ok()/.ok().flatten()to preserve existing semantics. Non-UTF-8 branch/commit names aren't a meaningful case for this tool.ssh/https/creddefault features (no longer default upstream). All network operations in this repo use subprocessgit/gh/glab; git2 is only used for local repo inspection, so transport features are unused.Oid::zero()with theOid::ZERO_SHA1constant (11 sites).Supersedes #336 (renovate's version-only bump, which didn't update call sites).
Test plan
cargo fmt --allcargo clippy --all-targets --all-features -- -D warningscargo test --all-features— 229 pass; 1 pre-existing failure (squash::test_squash_requires_stack) confirmed unrelated by running on the unmodified branch.🤖 Generated with Claude Code