From ea26bbe37f65e7793158f75c6abf126405824cbb Mon Sep 17 00:00:00 2001 From: Pierre Fenoll Date: Sat, 11 Aug 2018 15:54:29 +0200 Subject: clone repos with the smallest depth for speed and space Since kerl first does a mirror clone (to act as a cache) this optimization cannot be used on these clones. --- kerl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kerl b/kerl index a7f1e0c..9ea8870 100755 --- a/kerl +++ b/kerl @@ -409,7 +409,7 @@ do_git_build() { rm -Rf "${KERL_BUILD_DIR:?}/$3" mkdir -p "$KERL_BUILD_DIR/$3" || exit 1 cd "$KERL_BUILD_DIR/$3" || exit 1 - if ! git clone -l "$KERL_GIT_DIR/$GIT" otp_src_git >/dev/null 2>&1; then + if ! git clone -l --depth=1 "$KERL_GIT_DIR/$GIT" otp_src_git >/dev/null 2>&1; then echo 'Error cloning local git repository' exit 1 fi @@ -1176,7 +1176,7 @@ install_docsh() { rm -Rf "$DOCSH_DIR" mkdir -p "$DOCSH_DIR" || exit 1 cd "$DOCSH_DIR" || exit 1 - if ! git clone -l "$KERL_GIT_DIR/$GIT" "$DOCSH_DIR" >/dev/null 2>&1; then + if ! git clone -l --depth=1 "$KERL_GIT_DIR/$GIT" "$DOCSH_DIR" >/dev/null 2>&1; then echo 'Error cloning local git repository' exit 1 fi -- cgit v1.2.3