From c53545621e865dbee2661442f03f00152c48b92c Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Wed, 9 Aug 2023 15:14:50 -0700 Subject: [PATCH] jenkins: cleanup all orphaned git locks (#29296) --- selfdrive/test/setup_device_ci.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/selfdrive/test/setup_device_ci.sh b/selfdrive/test/setup_device_ci.sh index 7137bfad2b..4ac9707408 100755 --- a/selfdrive/test/setup_device_ci.sh +++ b/selfdrive/test/setup_device_ci.sh @@ -55,7 +55,9 @@ if [ ! -d "$SOURCE_DIR" ]; then fi cd $SOURCE_DIR -rm -f .git/index.lock +# cleanup orphaned locks +find .git -type f -name "*.lock" -exec rm {} + + git reset --hard git fetch --no-tags --no-recurse-submodules -j4 --verbose --depth 1 origin $GIT_COMMIT find . -maxdepth 1 -not -path './.git' -not -name '.' -not -name '..' -exec rm -rf '{}' \;