|
|
@ -47,7 +47,8 @@ IS_SIGNED () { |
|
|
|
return 1; |
|
|
|
return 1; |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
if [ "$VERIFY_TREE" = 1 ]; then |
|
|
|
# We set $4 to 1 on the first call, always verifying the top of the tree |
|
|
|
|
|
|
|
if [ "$VERIFY_TREE" = 1 -o "$4" = "1" ]; then |
|
|
|
IFS_CACHE="$IFS" |
|
|
|
IFS_CACHE="$IFS" |
|
|
|
IFS=' |
|
|
|
IFS=' |
|
|
|
' |
|
|
|
' |
|
|
@ -63,9 +64,10 @@ IS_SIGNED () { |
|
|
|
IFS="$IFS_CACHE" |
|
|
|
IFS="$IFS_CACHE" |
|
|
|
|
|
|
|
|
|
|
|
FILE_HASHES="" |
|
|
|
FILE_HASHES="" |
|
|
|
for FILE in $(git ls-tree --full-tree -r --name-only $1 | LANG=C sort); do |
|
|
|
for FILE in $(git ls-tree --full-tree -r --name-only $1 | LC_ALL=C sort); do |
|
|
|
HASH=$(git cat-file blob $1:"$FILE" | sha512sum | { read FIRST OTHER; echo $FIRST; } ) |
|
|
|
HASH=$(git cat-file blob $1:"$FILE" | sha512sum | { read FIRST OTHER; echo $FIRST; } ) |
|
|
|
[ "$FILE_HASHES" != "" ] && FILE_HASHES="$FILE_HASHES"$'\n' |
|
|
|
[ "$FILE_HASHES" != "" ] && FILE_HASHES="$FILE_HASHES"' |
|
|
|
|
|
|
|
' |
|
|
|
FILE_HASHES="$FILE_HASHES$HASH $FILE" |
|
|
|
FILE_HASHES="$FILE_HASHES$HASH $FILE" |
|
|
|
done |
|
|
|
done |
|
|
|
HASH_MATCHES=0 |
|
|
|
HASH_MATCHES=0 |
|
|
@ -86,7 +88,7 @@ IS_SIGNED () { |
|
|
|
local PARENTS |
|
|
|
local PARENTS |
|
|
|
PARENTS=$(git show -s --format=format:%P $1) |
|
|
|
PARENTS=$(git show -s --format=format:%P $1) |
|
|
|
for PARENT in $PARENTS; do |
|
|
|
for PARENT in $PARENTS; do |
|
|
|
if IS_SIGNED $PARENT $VERIFY_TREE $NO_SHA1; then |
|
|
|
if IS_SIGNED $PARENT $VERIFY_TREE $NO_SHA1 0; then |
|
|
|
return 0; |
|
|
|
return 0; |
|
|
|
fi |
|
|
|
fi |
|
|
|
break |
|
|
|
break |
|
|
@ -111,10 +113,9 @@ fi |
|
|
|
DO_CHECKOUT_TEST=0 |
|
|
|
DO_CHECKOUT_TEST=0 |
|
|
|
if [ x"$2" = "x--tree-checks" ]; then |
|
|
|
if [ x"$2" = "x--tree-checks" ]; then |
|
|
|
DO_CHECKOUT_TEST=1 |
|
|
|
DO_CHECKOUT_TEST=1 |
|
|
|
|
|
|
|
|
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
IS_SIGNED "$TEST_COMMIT" "$DO_CHECKOUT_TEST" 1 |
|
|
|
IS_SIGNED "$TEST_COMMIT" "$DO_CHECKOUT_TEST" 1 1 |
|
|
|
RES=$? |
|
|
|
RES=$? |
|
|
|
if [ "$RES" = 1 ]; then |
|
|
|
if [ "$RES" = 1 ]; then |
|
|
|
if ! "$HAVE_FAILED"; then |
|
|
|
if ! "$HAVE_FAILED"; then |
|
|
|