Skip to content

Commit ce1a047

Browse files
j6tgitster
authored andcommitted
t5300-pack-object: do not compare binary data using test_cmp
Users may set test_cmp to a comparison tool of their liking. The intent is that the tool performs comparison of line-oriented texts. However, t5300 uses it also to compare binary data. Change those tests to use 'cmp'. Signed-off-by: Johannes Sixt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3d092bf commit ce1a047

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

t/t5300-pack-object.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ test_expect_success \
151151
git cat-file $t $object || return 1
152152
done <obj-list
153153
} >current &&
154-
test_cmp expect current'
154+
cmp expect current'
155155

156156
test_expect_success \
157157
'use packed deltified (REF_DELTA) objects' \
@@ -166,7 +166,7 @@ test_expect_success \
166166
git cat-file $t $object || return 1
167167
done <obj-list
168168
} >current &&
169-
test_cmp expect current'
169+
cmp expect current'
170170

171171
test_expect_success \
172172
'use packed deltified (OFS_DELTA) objects' \
@@ -181,7 +181,7 @@ test_expect_success \
181181
git cat-file $t $object || return 1
182182
done <obj-list
183183
} >current &&
184-
test_cmp expect current'
184+
cmp expect current'
185185

186186
unset GIT_OBJECT_DIRECTORY
187187

@@ -195,9 +195,9 @@ test_expect_success 'survive missing objects/pack directory' '
195195
rm -fr $GOP &&
196196
git index-pack --stdin --keep=test <../test-3-${packname_3}.pack &&
197197
test -f $GOP/pack-${packname_3}.pack &&
198-
test_cmp $GOP/pack-${packname_3}.pack ../test-3-${packname_3}.pack &&
198+
cmp $GOP/pack-${packname_3}.pack ../test-3-${packname_3}.pack &&
199199
test -f $GOP/pack-${packname_3}.idx &&
200-
test_cmp $GOP/pack-${packname_3}.idx ../test-3-${packname_3}.idx &&
200+
cmp $GOP/pack-${packname_3}.idx ../test-3-${packname_3}.idx &&
201201
test -f $GOP/pack-${packname_3}.keep
202202
)
203203
'

0 commit comments

Comments
 (0)