Add repo init --depth parameter
Description
Add option to specify the git checkout depth by --depth <N>
at the repo init
stage.
Issue(s)
N/A
Test environment
docker run \
-v "$BASEDIR/src:/srv/src" \
-v "$BASEDIR/zips:/srv/zips" \
-v "$BASEDIR/logs:/srv/logs" \
-v "$BASEDIR/ccache:/srv/ccache" \
-v "$BASEDIR/keys:/srv/keys" \
-e "BRANCH_NAME=v1-q" \
-e "DEVICE_LIST=payton" \
-e "CLEAN_AFTER_BUILD=false" \
-e "DEVICE=payton" \
-e "REPO_INIT_DEPTH=1" \
-e "REPO=https://gitlab.e.foundation/e/os/releases.git" \
-it $DOCKER_IMAGE_NAME
Test procedures
Technical details
Most git server offer the option to specify the fetch depth. repo init --depth uses that depth in order to fetch only the top most commit without any history. This saves quite some bandwidth, disk space and download time.
--depth 1 on ext4:
# du --max-depth=1 -h /android-e/a-q/src/
133G /android-e/a-q/src/Q
default without --depth 1:
# du --max-depth=1 -h /android-e/a-q/src/
179G /android-e/a-q/src/Q
Screenshots
N/A
Check list
-
Self review -
Test procedure explained -
Tested on fresh install -
Tested applied as an update -
License - [?] Internal documentation
- [?] User documentation
Edited by M. M.