FYI: new git 2.9 feature, --shallow-submodules

43 wyświetlenia
Przejdź do pierwszej nieodczytanej wiadomości

Allen B. Riddell

nieprzeczytany,
16 cze 2016, 09:37:3116.06.2016
do stan...@googlegroups.com
There's a new feature in git 2.9 which looks like it might be useful for
speeding up some CI tests:

Source: https://blog.bitbucket.org/2016/06/13/git-2-9/

> git clone learned −−shallow-submodules
>
> If you’re using submodules, you’re in luck – for once! 🙂 Git 2.9
> introduces the −−shallow-submodules flag that allows you to grab a
> full clone of your repository, and then recursively shallow clone any
> referenced submodules to a depth of one commit. This is useful if you
> don’t need the full history of your project’s dependencies. For
> example, if you have a large monorepo with each project stored as a
> submodule, you may want to clone with shallow submodules initially,
> and then selectively deepen the few projects you want to work with.
> Another scenario would be configuring a CI or CD job that needs to
> perform a merge: Git needs the primary repository’s history in order
> to perform its recursive merge algorithm, and you’ll likely also need
> the latest commit from each of your submodules in order to actually
> perform the build. However you probably don’t need the full history
> for every submodule, so retrieving just the latest commit will save
> you both time and bandwidth.
Odpowiedz wszystkim
Odpowiedz autorowi
Przekaż
Nowe wiadomości: 0