libgit2 / libgit2/libgit2sharp
option to not update submodules when doing checkout
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- C#
- Sterne
- 3.5k
- Forks
- 925
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
it seems to be a known issue that, at least when there are numerous binary files in a submodule, the submodule update process takes much longer than specifically checking out each submodule. I am, using libgit2sharp to do these checkouts, but the checkout on the superproject takes much longer (~5 sec for super vs <0.1sec for each submodule).
It looks like Commands.Checkout is, effectively, running:
git checkout [sha]
git submodule update --recursive -f
or something like it, but I just want the first line, not both. Is there some repositoryOption or CheckoutOption or something I can use to use it like this?
my usage of ligit2sharp is:
using (Repository repo = new Repository(filePath))
{
//logging and timing
Commands.Checkout(
repo,
commit,
new CheckoutOptions() { CheckoutModifiers = CheckoutModifiers.Force }
);
//logging and timing
}
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne bei den in der Issue gezeigten Typen Commands.Checkout sowie CheckoutOptions und CheckoutModifiers und verfolge anschließend, wo Aktualisierungen von Submodulen ausgelöst werden. Überprüfe das Checkout-Verhalten und ermittle, wie eine Option diese Aktualisierung unterdrücken könnte; als erledigt gilt die Aufgabe, wenn ein Checkout Aktualisierungen von Submodulen überspringen kann, während das bestehende Verhalten standardmäßig erhalten bleibt und die neue Option durch Tests abgedeckt ist.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- csharp, git
- Bereich
- tooling
- Issue-Typ
- Feature
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 42/100