Skip to content

fix: vendor libgit2 to avoid system library linking failures#697

Merged
matt2e merged 1 commit intomainfrom
git2-dep
May 8, 2026
Merged

fix: vendor libgit2 to avoid system library linking failures#697
matt2e merged 1 commit intomainfrom
git2-dep

Conversation

@matt2e
Copy link
Copy Markdown
Contributor

@matt2e matt2e commented May 8, 2026

Summary

  • Adds the vendored-libgit2 feature to the git2 dependency in crates/git-diff/Cargo.toml
  • This ensures libgit2 is compiled from source rather than linking against system libraries, preventing linking failures in environments where system libgit2 is unavailable or incompatible

Test plan

  • CI passes (crates-fmt, crates-test, crates-lint, differ-ci, staged-ci)

🤖 Generated with Claude Code

Add vendored-libgit2 feature to the git2 dependency in git-diff so
libgit2 is built from source instead of linking against the system
library. This prevents build failures when the Homebrew libgit2 path
changes after upgrades (e.g. 1.9.2_1 → 1.9.3), which caused
"library 'git2' not found" linker errors even after cargo clean.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Matt Toohey <contact@matttoohey.com>
@matt2e matt2e requested review from baxen and wesbillman as code owners May 8, 2026 03:46
@matt2e matt2e merged commit 7498ba5 into main May 8, 2026
7 checks passed
@matt2e matt2e deleted the git2-dep branch May 8, 2026 04:03
matt2e added a commit that referenced this pull request May 8, 2026
Signed-off-by: Matt Toohey <contact@matttoohey.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

1 participant