Don't consult or change the global and system git configuration
requested to merge nick.thomas/gitlab-ci-multi-runner:1469-local-recurse-submodules-config into master
What does this MR do?
Writes a hard-coded gitconfig
file per build and sets it in $GIT_CONFIG
.
Why was this MR needed?
Previously, we were running `git config --global fetch.recurseSubmodules false" to disable recursive submodule fetches. This has a few problems:
- It modifies global state for the user the runner is under, which is unexpected in some environments
- Concurrent builds sometimes fail as
git config
doesn't cleanly handle concurrent writes to the same file.
This change switches to a separate gitconfig file per-build, with hardcoded values. This solves both issues, at the cost of removing support for setting custom options for the runner in /etc/gitconfig or ~/.gitconfig.
Are there points in the code the reviewer needs to double check?
- Do we need to support /etc/gitconfig or ~/.gitconfig (or the Windows equivalents)? Do we know if users are relying on this secret feature at the moment?
Does this MR meet the acceptance criteria?
-
CHANGELOG entry added -
Documentation created/updated - Tests
-
Added for this feature/bug -
All builds are passing
-
-
Branch has no merge conflicts with master
(if you do - rebase it please)
What are the relevant issue numbers?
Closes #1469 (closed)