Add support to fetch_git for shallow clones

This commit is contained in:
T. Joseph Carter 2015-02-17 18:34:31 -08:00
parent 42b9ad08b1
commit d18e7a5fd5

View File

@ -24,8 +24,10 @@ fetch_git() {
git submodule foreach git pull origin master
fi
else
echo "git clone \"$1\" \"$WORKDIR/$2\""
git clone "$1" "$WORKDIR/$2"
clone_type=
[ -n "$SHALLOW_CLONE" ] && depth="--depth 1"
echo "git clone $depth \"$1\" \"$WORKDIR/$2\""
git clone $depth "$1" "$WORKDIR/$2"
if [ -n "$4" ]; then
echo "cd \"$fetch_dir\""
cd "$fetch_dir"