From: Patrick Steinhardt Date: Fri, 30 Oct 2026 11:44:34 GMT Subject: Re: [PATCH v2 1/4] odb: use size_t for the length of objects to write Message-ID: In-Reply-To: <8fcb9f10f13962acd5cdac652bea8fc4164f2e78.1793352943.git.gitter.spiros@gmail.com> On Fri, Oct 30, 2026 at 10:58:50AM +0100, Elia Pinto wrote: > diff --git a/t/t1007-hash-object.sh b/t/t1007-hash-object.sh > index 463b38f990..0a89bbb455 100755 > --- a/t/t1007-hash-object.sh > +++ b/t/t1007-hash-object.sh > @@ -297,4 +297,17 @@ test_expect_success EXPENSIVE,SIZE_T_IS_64BIT \ > test_cmp expect actual > ' > > +test_expect_success EXPENSIVE,SIZE_T_IS_64BIT \ > + 'write filtered files over 4GB correctly' ' > + { test -f big || test-tool genzeros $((5*1024*1024*1024)) >big; } && > + test_oid large5GB >expect && > + test_config filter.null-filter.clean "cat" && > + echo "big filter=null-filter" >.gitattributes && > + git hash-object -w -- big >actual && > + test_cmp expect actual && > + echo $((5*1024*1024*1024)) >expect && Isn't this the exact same as `big`? So... > + git cat-file -s $(cat actual) >actual && We shouldn't read from and write to the same file. Maybe write it to "actual.size" instead? > + test_cmp expect actual > +' ... can't we `test_cmp big actual` here? Also, it might make sense to use `test_cmp_bin ()` instead. Patrick