Allow to configure GIT_DEPTH globally and/or per group
Proposal
Today, I struggled with submodule missing references. Finally, #30067 helped me figure all the implications of --depth option, and finally see that I need to set GIT_DEPTH=0 for all my projects because of our workflow. That's fine, this is git actual behavior of shallow repository, and we can live with no-shallow repositories in CI.
Now, I realize I must set GIT_DEPTH for all my projects. I would rather prefer something like:
- have an hard coded default value, eg. DEFAULT_GIT_DEPTH = 50
- have a GIT_DEPTH setting for the whole gitlab instance. If not set, fallback to upper bullet value
- have a GIT_DEPTH setting for for each group level. If not set, fallback to upper bullet value
- actual GIT_DEPTH setting at project level. If not set, fallback to upper bullet value