Try hard resetting the git repo to fix issues with pulling
All checks were successful
continuous-integration/drone/pr Build is passing

This commit is contained in:
delliott 2024-06-25 14:48:17 +02:00
parent 97e9fe668a
commit 795bc77207
Signed by: delliott
SSH Key Fingerprint: SHA256:h5IC6Ec/o6ypmpM7ZdRqULGyG8dz4Jr5K192BAWAjoo

View File

@ -104,6 +104,13 @@ git_build_into(){
fi
done
if [ "$gitterm" -ne 0 ]; then
debug "Three git pulls failed, hard resetting and repulling"
git -C "$basedir" reset --hard HEAD~50 >"$GITchanges" 2>"$GITerrors"
git -C "$basedir" pull >>"$GITchanges" 2>>"$GITerrors"
gitterm="$?"
fi
if [ "$gitterm" -ne 0 ]; then
die "GIT reported the following problem:\n$(cat "$GITerrors")"
fi