Re: [PATCH 00/15] submodule groups (once again)
Stefan Beller <sbeller@google.com> writes:
Show 47 quoted lines
> What is this series about?
> ==========================
>
> If you have lots of submodules, you probably don't need all of them at once,
> but you have functional units. Some submodules are absolutely required,
> some are optional and only for very specific purposes.
>
> This patch series adds labels to submodules in the .gitmodules file.
>
> So you could have a .gitmodules file such as:
>
> [submodule "gcc"]
> path = gcc
> url = git://...
> label = default
> label = devel
> [submodule "linux"]
> path = linux
> url = git://...
> label = default
> [submodule "nethack"]
> path = nethack
> url = git://...
> label = optional
> label = games
>
> and by this series you can work on an arbitrary group of these submodules
> composed by the labels, names or paths of the submodules.
>
> git clone --recurse-submodules --init-submodule=label --init-submodule=label2 git://...
> # will clone the superproject and recursively
> # checkout any submodule being labeled label or label2
>
> git submodule add --label <name> git://... ..
> # record a label while adding a submodule
>
> git config submodule.defaultGroups default
> git config --add submodule.defaultGroups devel
> # configure which submodules you are interested in.
>
> git submodule update
> # update only the submodules in the default group if that is configured.
>
> git status
> git diff
> git submodule summary
> # show only changes to submodules which are in the default group.