Skip to content

Set GIT_DEPTH to 1

Stan Hu requested to merge sh-set-git-depth-to-1 into master

Before if the SHA of the last CI run were ahead of the next CI run by more than 50 commits, the build would fail because Git assumes the full history is present (#33041 (closed)). It does not know the current repository has a shallow clone.

With #39134 (closed), the pre-clone script now seeds the repository with the full history of master and a consistent snapshot. As a result, we should be able to use a shallow clone of depth 1, reducing load on the server.

However, forks of the EE repository will not have this pre-clone script, so CI runs from forks may be vulnerable to the issue described.

Edited by Stan Hu

Merge request reports