File tree Expand file tree Collapse file tree 3 files changed +9
-9
lines changed
Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 2525if test ! -d " $REPO_FOLDER " ; then
2626 git clone --depth 1 -b " $REPO_REF " " $REPO_URL " " $REPO_FOLDER "
2727else
28- git -C " $REPO_FOLDER " fetch origin
29- git -C " $REPO_FOLDER " reset --hard " origin/ $REPO_REF "
30- git -C " $REPO_FOLDER " checkout " $REPO_REF "
28+ git -C " $REPO_FOLDER " remote set-url origin " $REPO_URL "
29+ git -C " $REPO_FOLDER " fetch origin " $REPO_REF " --depth=1
30+ git -C " $REPO_FOLDER " checkout -f FETCH_HEAD
3131fi
3232
3333cd " $REPO_FOLDER "
Original file line number Diff line number Diff line change 2525if test ! -d " $REPO_FOLDER " ; then
2626 git clone --depth 1 -b " $REPO_REF " " $REPO_URL " " $REPO_FOLDER "
2727else
28- git -C " $REPO_FOLDER " fetch origin
29- git -C " $REPO_FOLDER " reset --hard " origin/ $REPO_REF "
30- git -C " $REPO_FOLDER " checkout " $REPO_REF "
28+ git -C " $REPO_FOLDER " remote set-url origin " $REPO_URL "
29+ git -C " $REPO_FOLDER " fetch origin " $REPO_REF " --depth=1
30+ git -C " $REPO_FOLDER " checkout -f FETCH_HEAD
3131fi
3232
3333cd " $REPO_FOLDER "
Original file line number Diff line number Diff line change 2525if test ! -d " $REPO_FOLDER " ; then
2626 git clone --depth 1 -b " $REPO_REF " " $REPO_URL " " $REPO_FOLDER "
2727else
28- git -C " $REPO_FOLDER " fetch origin
29- git -C " $REPO_FOLDER " reset --hard " origin/ $REPO_REF "
30- git -C " $REPO_FOLDER " checkout " $REPO_REF "
28+ git -C " $REPO_FOLDER " remote set-url origin " $REPO_URL "
29+ git -C " $REPO_FOLDER " fetch origin " $REPO_REF " --depth=1
30+ git -C " $REPO_FOLDER " checkout -f FETCH_HEAD
3131fi
3232
3333cd " $REPO_FOLDER "
You can’t perform that action at this time.
0 commit comments