Skip to content

Remove LibGit2Sharp and native binaries (Phase E) #5040

Description

@arturcic

After the managed backend has been default for several releases without regressions: delete src/GitVersion.LibGit2Sharp and new-cli/GitVersion.Core.Libgit2Sharp, re-point new-cli source-linking at the managed reader/adapter, drop the package reference, add a packaging assertion test that shipped nupkgs contain zero runtimes/**/native/* entries, update docs.

Also remove the dual-backend validation scaffolding

With libgit2 gone there is a single backend, so the machinery that exists only to run and compare both implementations should be removed too:

  • Backend selection — the GITVERSION_GIT_BACKEND environment variable, GitBackendSelector/GitBackend (in GitVersion.Core), and the selection branches at the composition roots (CliHost, GitVersionCoreTestModule) collapse to registering the managed module directly.
  • Dual-backend CI matrix — drop the git_backend: [libgit2, managed] dimension and the GITVERSION_GIT_BACKEND env in .github/workflows/_unit_tests.yml (and revert the matrix.git_backend == 'libgit2'-gated coverage/summary conditions).
  • Parity tests — delete DualBackendParityTests and GitBackendSelectorTests (and the libgit2 InternalsVisibleTo grants that exist only so those tests can open the libgit2 backend directly).
  • Parity corpus tooling — remove the corpus diff scripts (build/parity-corpus.ps1, tests/scripts/backend-parity-corpus.sh) that cross-check the two backends on real-world repositories.
  • Docs/migration notes — drop the GITVERSION_GIT_BACKEND entries from the v6→v7 migration guide and env-var tables.

Keep the managed-only tests that happen to have grown out of parity work (e.g. GitVersion.Git.Managed.Tests) — only the comparison/selection scaffolding goes.

Part of #5031 — see docs/design/managed-git-migration.md for the full design.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions