Changeset - r24416:b913ae89145f
[Not reviewed]
master
0 1 0
glx22 - 4 years ago 2020-12-09 23:31:03
glx@openttd.org
Fix: Prevent infinite recursion in commit checker
1 file changed with 6 insertions and 0 deletions:
0 comments (0 inline, 0 general)
.github/workflows/commit-checker.yml
Show inline comments
 
@@ -24,6 +24,12 @@ jobs:
 
        # the log between HEAD^ and HEAD^2 will be the commits in the pull-request.
 
        DEPTH=4
 
        while [ -z "$(git merge-base HEAD^ HEAD^2)" ]; do
 
            # Prevent infinite recursion
 
            if [ ${DEPTH} -gt 256 ]; then
 
                echo "No common parent between '${GITHUB_HEAD_REF}' and '${GITHUB_BASE_REF}'." >&2
 
                exit 1
 
            fi
 

	
 
            git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --deepen=${DEPTH} origin HEAD
 
            DEPTH=$(( ${DEPTH} * 4 ))
 
        done
0 comments (0 inline, 0 general)