Don't fetch a submodule if the commit is already known

This allows rebuilding without an internet connection and avoids random
build failures on flaky connections.
This commit is contained in:
Stefan Dösinger 2023-07-28 16:11:51 +03:00
parent d9b32e0c75
commit f7e0d7db3e

View File

@ -232,7 +232,7 @@ function update_repo() {
if [ -d $1 -a -d $1/.git ]; then if [ -d $1 -a -d $1/.git ]; then
cd $1 cd $1
git fetch --all git cat-file -e $3 || git fetch --all
git checkout --force $3 git checkout --force $3
cd - > /dev/null cd - > /dev/null
else else