Optimization in git clone using --depth 68/108368/3
authorPratik Raj <rajpratik71@gmail.com>
Thu, 28 May 2020 05:36:41 +0000 (11:06 +0530)
committerSébastien Determe <sebastien.determe@intl.att.com>
Wed, 29 Jul 2020 13:23:41 +0000 (13:23 +0000)
optimize the git clone using --depth flag in term of size of clone
and also in term's of time taken to fetch the files and commit history
of whole repository .

More detail can be found at blog
https://www.atlassian.com/git/tutorials/big-repositories

Issue-ID: SDC-3089
Signed-off-by: Pratik Raj <rajpratik71@gmail.com>
Change-Id: Ib806bf0c172bd304abe9a138e2f85fcf14e07675

sdc-os-chef/scripts/k8s/build_nsenter_exec.sh

index 7ee1196..cf95ab8 100644 (file)
@@ -9,7 +9,7 @@ docker run --name nsenter -it ubuntu:14.04 bash
 apt-get update
 apt-get install git build-essential libncurses5-dev libslang2-dev gettext zlib1g-dev libselinux1-dev debhelper lsb-release pkg-config po-debconf autoconf automake autopoint libtool bison
 
-git clone git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git util-linux
+git clone --depth 1 git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git util-linux
 cd util-linux/
 
 ./autogen.sh