Use shallow clone in update-vendor.sh

This commit is contained in:
Thomas George Hartland 2020-08-10 12:55:37 +02:00
parent 30ee31d866
commit 92229a112e
1 changed files with 4 additions and 3 deletions

View File

@ -80,12 +80,13 @@ set +o errexit
if [ ! -d ${K8S_REPO} ]; then
echo "Cloning ${K8S_FORK} into ${K8S_REPO}"
git clone ${K8S_FORK} ${K8S_REPO} >&${BASH_XTRACEFD} 2>&1
git clone --depth 1 ${K8S_FORK} ${K8S_REPO} >&${BASH_XTRACEFD} 2>&1
fi
pushd ${K8S_REPO} >/dev/null
git checkout ${K8S_REV} >&${BASH_XTRACEFD} 2>&1
K8S_REV_PARSED=$(git rev-parse ${K8S_REV})
git fetch --depth 1 origin ${K8S_REV} >&${BASH_XTRACEFD} 2>&1
git checkout FETCH_HEAD >&${BASH_XTRACEFD} 2>&1
K8S_REV_PARSED=$(git rev-parse FETCH_HEAD)
popd >/dev/null