3 ms·
Is there any way to do this for GitLab CI [1]? I'm using GIT_DEPTH=1, but I'm not sure how to set refspecs. It's not too important right now since it only takes
by nathan_f77 6y ago
Is there any way to do this for GitLab CI [1]? I'm using GIT_DEPTH=1, but I'm not sure how to set refspecs. It's not too important right now since it only takes about 11 seconds to clone the git repo, but maybe it's a quick win as well.
[1] https://docs.gitlab.com/ee/ci/large_repositories/ https://docs.gitlab.com/ee/ci/large_repositories/
- mcintyre1994 6y agoThe docs seem to give the impression that they already do this, but it'd be great if someone from Gitlab could confirm because it doesn't use the refspec term or show the resulting git command. > The following example makes the runner shallow clone to fetch only a given branch; it does not fetch any other branches nor tags. https://docs.gitlab.com/ee/ci/large_repositories/#shallow-cloning https://docs.gitlab.com/ee/ci/large_repositories/#shallow-cl...
- paytonburd 6y agoCheckout the docs here https://docs.gitlab.com/ee/ci/yaml/README.html#git-fetch-extra-flags https://docs.gitlab.com/ee/ci/yaml/README.html#git-fetch-ext... GIT_FETCH_EXTRA_FLAGS accepts all options of the git fetch command
- mcintyre1994 6y agoThanks for that link - seems to be further evidence they do already do this refspec flag by default. > The default flags are: GIT_DEPTH. The list of refspecs. A remote called origin.