mirror of
https://github.com/gbdev/rgbds.git
synced 2026-09-16 02:37:06 +00:00
Fix updating ext-test repos from existing copies
The current setup fails with a "cannot read tree" error. Also added flags to parallelise each fetch, which is relevant when submodules are involved. (So, pretty much just starter-kit, haha.) It would be nice to also parallelise the various fetches, but that would hit the same remote multiple times, and could lead to rate-limiting...
This commit is contained in:
Vendored
+8
-4
@@ -69,12 +69,16 @@ case "$actionname" in
|
||||
|
||||
action() {
|
||||
if [ ! -d "$EXT_TEST_REPO" ]; then
|
||||
git clone "https://$EXT_TEST_DOMAIN/$EXT_TEST_OWNER/$EXT_TEST_REPO.git" \
|
||||
git clone "https://$EXT_TEST_DOMAIN/$EXT_TEST_OWNER/$EXT_TEST_REPO" \
|
||||
--revision="$EXT_TEST_COMMIT" --depth=1 --recursive --shallow-submodules \
|
||||
--config advice.detachedHead=false
|
||||
--jobs=0 --config advice.detachedHead=false
|
||||
pushd "$EXT_TEST_REPO"
|
||||
else
|
||||
pushd "$EXT_TEST_REPO"
|
||||
git remote set-url origin "https://$EXT_TEST_DOMAIN/$EXT_TEST_OWNER/$EXT_TEST_REPO"
|
||||
git fetch --depth=1 --recurse-submodules --jobs=0 origin -- "$EXT_TEST_COMMIT"
|
||||
git checkout --force --detach "$EXT_TEST_COMMIT" --
|
||||
fi
|
||||
pushd "$EXT_TEST_REPO"
|
||||
git checkout --force --detach "$EXT_TEST_COMMIT" --
|
||||
if [ -f "../patches/$EXT_TEST_REPO.patch" ]; then
|
||||
git apply --ignore-whitespace "../patches/$EXT_TEST_REPO.patch"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user