chore: adjust comment about MAX_COMMITS_TO_CHECK
All checks were successful
Validate Trusted Timestamps Actions Demo / Validate (push) Successful in 14m39s
All checks were successful
Validate Trusted Timestamps Actions Demo / Validate (push) Successful in 14m39s
This commit is contained in:
@@ -311,6 +311,8 @@ validate_commit() {
|
|||||||
# param1: commit hash
|
# param1: commit hash
|
||||||
# returns: 0 if the validation of the commit and all its ancestors succeeded
|
# returns: 0 if the validation of the commit and all its ancestors succeeded
|
||||||
validate_commit_and_parents() {
|
validate_commit_and_parents() {
|
||||||
|
# If MAX_COMMITS_TO_CHECK is zero (or a negative number) then that is understood as "infinity".
|
||||||
|
# So finish if we have reached the limit, and if the limit is not "infinity".
|
||||||
NUM_COMMITS_CHECKED=${#PROCESSED_COMMIT[@]}
|
NUM_COMMITS_CHECKED=${#PROCESSED_COMMIT[@]}
|
||||||
if [[ ${NUM_COMMITS_CHECKED} -ge ${MAX_COMMITS_TO_CHECK} ]] && [[ ${MAX_COMMITS_TO_CHECK} -ge 1 ]]; then
|
if [[ ${NUM_COMMITS_CHECKED} -ge ${MAX_COMMITS_TO_CHECK} ]] && [[ ${MAX_COMMITS_TO_CHECK} -ge 1 ]]; then
|
||||||
# enough commits have already been checked, so return early
|
# enough commits have already been checked, so return early
|
||||||
@@ -323,8 +325,6 @@ validate_commit_and_parents() {
|
|||||||
if ! validate_commit "$COMMIT_HASH"; then
|
if ! validate_commit "$COMMIT_HASH"; then
|
||||||
ALL_PASSED=false
|
ALL_PASSED=false
|
||||||
fi
|
fi
|
||||||
# If MAX_COMMITS_TO_CHECK is zero (or a negative number) then that is understood as "infinity".
|
|
||||||
# So perform the next commit check if we have not reached the limit, or if the limit is "infinity".
|
|
||||||
NUM_COMMITS_CHECKED=${#PROCESSED_COMMIT[@]}
|
NUM_COMMITS_CHECKED=${#PROCESSED_COMMIT[@]}
|
||||||
local PARENTS=$(git cat-file -p "$COMMIT_HASH" | awk '/^$/{exit} /parent/ {print}' | sed 's/parent //')
|
local PARENTS=$(git cat-file -p "$COMMIT_HASH" | awk '/^$/{exit} /parent/ {print}' | sed 's/parent //')
|
||||||
#iterate over all parents of commit
|
#iterate over all parents of commit
|
||||||
|
|||||||
Reference in New Issue
Block a user