File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 1- version : 10.1.19
1+ version : 10.1.20
Original file line number Diff line number Diff line change @@ -25,10 +25,10 @@ git_retry () {
2525(
2626 set +e
2727 RETRY_ON_SIGNAL=128
28- COMMAND=$@
28+ COMMAND=( " $@ " ) # Store the command and arguments as an array
2929 local TRY_NUM=1 MAX_TRIES=4 RETRY_WAIT=5
3030 until [[ " $TRY_NUM " -ge " $MAX_TRIES " ]]; do
31- $ COMMAND
31+ " ${ COMMAND[@]} " # Use "${COMMAND[@]}" to preserve arguments with quotes
3232 EXIT_CODE=$?
3333 if [[ $EXIT_CODE == 0 ]]; then
3434 break
@@ -196,6 +196,10 @@ if [ -d "$CLONE_DIR" ]; then
196196 cd $CLONE_DIR
197197
198198 if [ -n " $REVISION " ]; then
199+ if [ -n " $DEPTH " ]; then
200+ git_retry git remote set-branches origin " *"
201+ git_retry git fetch --depth=$DEPTH
202+ fi
199203 git_checkout
200204 fi
201205 fi
@@ -205,6 +209,10 @@ else
205209 eval $GIT_COMMAND
206210 cd $CLONE_DIR
207211 if [ -n " $REVISION " ]; then
212+ if [ -n " $DEPTH " ]; then
213+ git_retry git remote set-branches origin " *"
214+ git_retry git fetch --depth=$DEPTH
215+ fi
208216 git_checkout
209217 fi
210218
You can’t perform that action at this time.
0 commit comments