Skip to content

Commit

Permalink
Change fast-setup.sh to use shallow-since
Browse files Browse the repository at this point in the history
Shallow cloning will not work since we are now referring to active
upstream URL.
Use git clone with --shallow-since to make it work and also reduce the
time for cloning submodules. This works for Git >= 2.11
  • Loading branch information
dayeol committed Jan 29, 2020
1 parent 42f3c80 commit e2c298e
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions fast-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,17 @@ fi

echo "Updating and cloning submodules, this may take a long time"
git config submodule.riscv-gnu-toolchain.update none
git config -f .gitmodules submodule.linux.shallow true
git config -f .gitmodules submodule.qemu.shallow true
git config -f .gitmodules submodule.buildroot.shallow true

# shallow clone submodules ahead of time (Git must be > 2.11)
if [ ! -d linux ]; then
git clone --shallow-since=2019-09-14 https://github.com/torvalds/linux.git linux
fi
if [ ! -d buildroot ]; then
git clone --shallow-since=2019-08-29 https://github.com/buildroot/buildroot.git buildroot
fi
if [ ! -d qemu ]; then
git clone --shallow-since=2018-08-14 https://github.com/qemu/qemu.git qemu
fi

git submodule sync --recursive
git submodule update --init --recursive
Expand Down

0 comments on commit e2c298e

Please sign in to comment.