boostorg / boostorg/boost

Avoiding slowness for git submodule

Aperta
#421 0 commenti 6 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
HTML
Stelle
8.6k
Fork
1.9k
Merge medio
39m
PR unite (30g)
2

Descrizione

I've recently started adding `boostorg/boost` as a git submodule for my own application. After experimenting, I've discovered that doing so will make your `git status` commands very slow (here ~3secs; normally ~0.2secs).

> Note that your root repo will always look for your submodules' changes to keep everything in track, so the git command outside the boost submodule directory will also be affected

git has the option [`submodule..ignore`](https://git-scm.com/docs/git-config#Documentation/git-config.txt-submoduleltnamegtignore) for mitigating this kind of situation. I've modified my `.gitmodules` and confirmed it's working.

__before:__
```gitconfig
[submodule "modules/boost"]
path = modules/boost
url = https://github.com/boostorg/boost.git
```

__after:__
```gitconfig
[submodule "modules/boost"]
path = modules/boost
url = https://github.com/boostorg/boost.git
ignore = all
```

I think this change has no disadvantages to most of the application developers, since they won't modify the contents of boostorg/boost itself during the development of their own program.

Could someone (with write permission) add some notes to the wiki describing the workaround mentioned above?

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Inizia dalla sezione “Installing Boost” della pagina wiki collegata e analizza il workaround segnalato in .gitmodules che usa submodule..ignore = all. Aggiungi una nota concisa che spieghi il rallentamento di git status e il workaround, quindi verifica che le indicazioni corrispondano alla configurazione mostrata nell’issue.

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

Valutazione

Stack tecnologico
git
Ambito
documentation
Tipo di issue
Documentazione
Difficoltà
1/5
Tempo stimato
1-3 ore
Stato di attività
Ferma
Chiarezza
Specificata chiaramente
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.