Re: [PATCH v7 1/1] repo: add filtering options to "repo structure"
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 17, 2026, 03:59 UTC
- Message-ID
- <xmqq33u5c6z6.fsf@gitster.g>
- In-Reply-To
- <20261015170342.39967-2-markchucarroll@fastmail.com>
"Mark C. Chu-Carroll" <markchucarroll@fastmail.com> writes:
> t/t1901-repo-structure.sh | 197 ++++++++++++++++++++++++++++++++++++
This test is broken with SHA-256 and in Git 3.0.
> +test_expect_success 'filter by object type' '
This hardcodes many 40 hexdigits constants, like ...
Show 6 quoted lines
> + test_when_finished "rm -rf repo" && > + git init repo && > + ( > ... > + objects.blobs.max_size=13 > + objects.blobs.max_size_oid=97d808e45116bf02103490294d3d46dad7a2ac62
... this one, which is very specific to SHA-1. Existing tests in this file (like the one immediately after this one) protects such a test with SHA1 prerequisite to avoid breaking in SHA-256 environment, which is far from ideal but better than leaving it broken. In the longer term, we should strive to get rid of use of SHA1 prerequisites, as SHA-256 will be becoming the default in not so distant future versions of Git.
> test_expect_success SHA1 'lines and nul format' ' > test_when_finished "rm -rf repo" && > git init repo &&
If you choose to fix them, see recent effort by others for inspiration to make sure you can share and reuse most of this test between two supported hash functions, e.g. the discussion that lead to
https://lore.kernel.org/git/pull.2252.v4.git.1792012956734.gitgitgadget@gmail.com/
but you may choose to punt and just put your broken test under SHA1 prerequisite to sweep the breakage under the rug just like other existing tests in this file.