feature: default to checking all commits
All checks were successful
Validate Trusted Timestamps Actions Demo / Validate (push) Successful in 13m47s
All checks were successful
Validate Trusted Timestamps Actions Demo / Validate (push) Successful in 13m47s
This commit is contained in:
@@ -42,7 +42,7 @@ if [[ ! -d "$DIR" ]]; then DIR="$PWD"; fi
|
|||||||
. "$DIR/timestamping"
|
. "$DIR/timestamping"
|
||||||
|
|
||||||
declare -i MINVERSION=$TIMESTAMPING_VERSION
|
declare -i MINVERSION=$TIMESTAMPING_VERSION
|
||||||
declare -i MAX_COMMITS_TO_CHECK=20
|
declare -i MAX_COMMITS_TO_CHECK=0
|
||||||
declare -A PROCESSED_COMMIT
|
declare -A PROCESSED_COMMIT
|
||||||
|
|
||||||
while [[ $# -gt 0 ]]; do
|
while [[ $# -gt 0 ]]; do
|
||||||
@@ -318,8 +318,10 @@ 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[@]}
|
||||||
if [[ ${NUM_COMMITS_CHECKED} -lt ${MAX_COMMITS_TO_CHECK} ]] ; then
|
if [[ ${NUM_COMMITS_CHECKED} -lt ${MAX_COMMITS_TO_CHECK} ]] || [[ ${MAX_COMMITS_TO_CHECK} -lt 1 ]]; then
|
||||||
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
|
||||||
if [ ! -z "$PARENTS" ]; then
|
if [ ! -z "$PARENTS" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user