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:
parent
d9b32e0c75
commit
f7e0d7db3e
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user