Skip to content

Commit daeb6c8

Browse files
committed
t1007-hash-objects: 5GiB file (size_t) LLP64 test case
Add a 'clean' filtered LLP64 big file test case to the has-object test cases. The object is not written to the object store. A simple 'nullfilter' is used, and was tested for failure with filter.nullfilter.clean "echo wrong && cat". The `big` file from the previous tests is reused, to save setup time, though the generation code is retained as a comment line. Signed-off-by: Philip Oakley <[email protected]>
1 parent 966c3e0 commit daeb6c8

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

t/t1007-hash-object.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,4 +275,16 @@ test_expect_success EXPENSIVE,SIZE_T_IS_64BIT,!LONG_IS_64BIT \
275275
test_cmp expect actual
276276
'
277277

278+
# This clean filter does nothing, other than excercising the interface.
279+
# We ensure that cleaning doesn't mangle large files on 64-bit Windows.
280+
test_expect_success EXPENSIVE,SIZE_T_IS_64BIT,!LONG_IS_64BIT \
281+
'hash filtered files over 4GB on input' '
282+
# test-tool genzeros $((5*1024*1024*1024)) >big &&
283+
test_oid large5GB >expect &&
284+
test_config filter.nullfilter.clean "cat" &&
285+
echo "big filter=nullfilter" >.gitattributes &&
286+
git hash-object -- big >actual &&
287+
test_cmp expect actual
288+
'
289+
278290
test_done

0 commit comments

Comments
 (0)