File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change 1
- b00ba6251f71fa1edaabdf809514e1bc3c67862e
1
+ f7ec7cfd38b543ba81ac7bed5b77f9a19739460b
Original file line number Diff line number Diff line change @@ -47,7 +47,8 @@ IS_SIGNED () {
47
47
return 1;
48
48
fi
49
49
50
- if [ " $VERIFY_TREE " = 1 ]; then
50
+ # We set $4 to 1 on the first call, always verifying the top of the tree
51
+ if [ " $VERIFY_TREE " = 1 -o " $4 " = " 1" ]; then
51
52
IFS_CACHE=" $IFS "
52
53
IFS='
53
54
'
@@ -63,9 +64,10 @@ IS_SIGNED () {
63
64
IFS=" $IFS_CACHE "
64
65
65
66
FILE_HASHES=" "
66
- for FILE in $( git ls-tree --full-tree -r --name-only $1 | LANG =C sort) ; do
67
+ for FILE in $( git ls-tree --full-tree -r --name-only $1 | LC_ALL =C sort) ; do
67
68
HASH=$( git cat-file blob $1 :" $FILE " | sha512sum | { read FIRST OTHER; echo $FIRST ; } )
68
- [ " $FILE_HASHES " != " " ] && FILE_HASHES=" $FILE_HASHES " $' \n '
69
+ [ " $FILE_HASHES " != " " ] && FILE_HASHES=" $FILE_HASHES " '
70
+ '
69
71
FILE_HASHES=" $FILE_HASHES$HASH $FILE "
70
72
done
71
73
HASH_MATCHES=0
@@ -86,7 +88,7 @@ IS_SIGNED () {
86
88
local PARENTS
87
89
PARENTS=$( git show -s --format=format:%P $1 )
88
90
for PARENT in $PARENTS ; do
89
- if IS_SIGNED $PARENT $VERIFY_TREE $NO_SHA1 ; then
91
+ if IS_SIGNED $PARENT $VERIFY_TREE $NO_SHA1 0 ; then
90
92
return 0;
91
93
fi
92
94
break
111
113
DO_CHECKOUT_TEST=0
112
114
if [ x" $2 " = " x--tree-checks" ]; then
113
115
DO_CHECKOUT_TEST=1
114
-
115
116
fi
116
117
117
- IS_SIGNED " $TEST_COMMIT " " $DO_CHECKOUT_TEST " 1
118
+ IS_SIGNED " $TEST_COMMIT " " $DO_CHECKOUT_TEST " 1 1
118
119
RES=$?
119
120
if [ " $RES " = 1 ]; then
120
121
if ! " $HAVE_FAILED " ; then
You can’t perform that action at this time.
0 commit comments