File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -66,12 +66,17 @@ if [ ! -z "$su2branch" ]; then
6666 echo " Branch provided. Cloning to $PWD /src/$name "
6767 cd " src"
6868
69+ if [ -d $name ]; then
70+ # Remove any previous local repo. For non-ephemeral self-hosted runners
71+ rm -rf $name
72+ fi
6973 # Clone su2code/SU2, su2code/TestCases and su2code/Tutorials
70- git clone -b master https://github.com/su2code/SU2 $name
74+ # Clone only the latest commit, without the Git history. It is much faster this way.
75+ git clone -b master --recursive --depth=1 --shallow-submodules https://github.com/su2code/SU2 $name
7176 cd $name
7277 git config --add remote.origin.fetch ' +refs/pull/*/merge:refs/remotes/origin/refs/pull/*/merge'
7378 git config --add remote.origin.fetch ' +refs/heads/*:refs/remotes/origin/refs/heads/*'
74- git fetch origin
79+ git fetch origin --depth=1 $su2branch : $su2branch
7580 git checkout $su2branch
7681 git submodule update
7782 cd ..
You can’t perform that action at this time.
0 commit comments