[Feature] Replace LibGit2Sharp with a managed Git implementation (managed reads + git CLI writes)

Aperta
#5,031 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
15/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
csharp, git
Ambito
backend, cli, devtools

Direzione di ricerca

Leggi docs/design/managed-git-migration.md e il piano di rilascio in #5135, quindi esamina src/GitVersion.Git.Managed e le issue relative alle fasi elencate qui. Il lavoro sul backend gestito è completo; la validazione rimanente segue #5040, incluse le suite complete di integrazione e parità, i controlli degli artefatti e una documentazione coerente per v7/v8.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Description

Replace LibGit2Sharp with a hybrid Git backend: a vendored fully managed reader for read/history operations plus the git CLI for writes and network operations. The end state ships no native Git binaries.

Supersedes the exploration in arturcic/GitVersion#236. The full technical design remains in docs/design/managed-git-migration.md and must be aligned with the release plan below.

Status

Phases A, B-pre, and B are complete and merged through #5084. The managed backend is implemented and covered by backend parity tests.

The release lifecycle is now governed by #5135:

Release Runtime behavior
v7.0 Managed backend is the default; GITVERSION_GIT_BACKEND=libgit2 is the temporary fallback.
v7.1 LibGit2Sharp and native binaries are removed by #5040; libgit2 selection produces an actionable removal error.
v7.x Explicit GITVERSION_GIT_BACKEND=managed remains accepted as a no-op for automation compatibility.
v8 #5136 removes the selector variable and its compatibility validation.

The former v7.1 default-flip issue #5039 is superseded by #5135.

Phase tracking

Phase Issue State
A — Git CLI mutator #5032 Complete
B-pre — interface cleanup folded into #5032 Complete
B.1 — object store #5033 Complete
B.2 — refs/discovery #5034 Complete
B.3 — revwalk/merge-base #5035 Complete
B.4 — diff/status #5036 Complete
B.5 — adapter and parity #5037 / #5084 Complete
Former C — v7.1 default flip #5039 Superseded by #5135
E — remove LibGit2Sharp #5040 Planned for v7.1
F — commit-graph acceleration #5041 Optional

Shipped architecture

  • src/GitVersion.Git.Managed contains the managed reader and Git CLI executor and implements the Core Git abstractions directly.
  • Read-only version calculation on a prepared checkout does not require git on PATH.
  • Repository normalization, dynamic repositories, fetch, clone, checkout, and other network/write operations use the Git CLI.
  • Backend selection is centralized during the v7.0 compatibility window.
  • #5040 removes libgit2 production code and dual-backend comparison infrastructure in v7.1 while retaining only the v7 selector compatibility validator required by #5135.

Validation requirements

  • Full integration suites and order-sensitive parity tests must remain green for both backends until libgit2 removal.
  • Managed tests cover loose/packed objects, delta resolution, refs, worktrees, shallow repositories, revwalk ordering, merge-base, tree diff, index/status, and repository preparation.
  • Artifact tests verify that v7.1 packages contain no LibGit2Sharp assemblies or runtimes/**/native/* entries.
  • Migration and breaking-change documentation must consistently reflect the v7.0 managed default, v7.1 removal, and v8 selector cleanup.

Related follow-ups

  • #2921 tracks lightweight dynamic repositories and remote-ref discovery separately.
  • #5135 aligns parser, configuration, and Git-backend selectors across v7.
  • #5136 removes the selector variables in v8.
Lingua principale
C#
Stelle
3.1k
Fork
661
Merge medio
7h 4m
PR unite (30g)
77

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di GitTools/GitVersion

Tutte le issue di GitTools/GitVersion

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.