Repository navigation
feat!: remove previously deprecated APIs - #1326
Merged
Merged
Conversation
0.22 is a breaking release anyway,
so drop the shims that earlier releases deprecated:
* `Diff::format_email`, along with its unexported options type:
use `Email::from_diff`.
Its test now goes through `Email::from_diff`, with the same expected output.
* `RepoBuilder::{local,hardlinks}`: use `RepoBuilder::clone_local`.
Without `clone_local`, the clone uses `GIT_CLONE_LOCAL_AUTO`,
which is what the old defaults resolved to.
* `Submodule::url_bytes`: use `Submodule::opt_url_bytes`.
* `Oid::zero`: use `Oid::ZERO_SHA1`.
* `TransportProgress`: use `IndexerProgress`.
0.19 is a breaking release anyway, so drop the bindings that earlier releases deprecated: * `git_transfer_progress`: use `git_indexer_progress`. * `git_oid_iszero`: use `git_oid_is_zero`. * `git_odb_backend_malloc`: use `git_odb_backend_data_alloc`. git2 uses none of them.
weihanglo
force-pushed
the
remove-deprecated
branch
from
October 31, 2026 13:37
3b74d92 to
c620321
Compare
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.
git2@0.22 and libgit2-sys@0.19 is a breaking release anyway,
so drop those earlier releases deprecated:
git2
Diff::format_email(), replaced byEmail::from_diff()Oid::zero(), replaced byOid::ZERO_SHA1RepoBuilder::hardlinks(), replaced byRepoBuilder::clone_local()RepoBuilder::local(), replaced byRepoBuilder::clone_local()Submodule::url_bytes(), replaced bySubmodule::opt_url_bytes()TransportProgress, replaced byIndexerProgresslibgit2-sys
git_odb_backend_malloc, replaced bygit_odb_backend_data_allocgit_oid_iszero, replaced bygit_oid_is_zerogit_transfer_progress, replaced bygit_indexer_progress