Re: [PATCH v7 1/1] repo: add filtering options to "repo structure"
- From
- Mark C. Chu-Carroll <markchucarroll@fastmail.com>
- Date
- Nov 18, 2026, 19:30 UTC
- Message-ID
- <DMYL3TCBEMAJ.2MW8J9PLG9ZD@fastmail.com>
- In-Reply-To
- <xmqq33u5c6z6.fsf@gitster.g>
On Fri Oct 16, 2026 at 11:59 PM EDT, Junio C Hamano wrote:
Show 39 quoted lines
> "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 ... > >> + 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.
Sorry for the delay in responding to this; I missed this message.
I think that the best approach for now is to put this under SHA1, then I'll take on updating all of the tests in this file to get rid ofthe SHA1 prerequisite.
-Mark
-- Mark Craig Chu-Carroll (@MarkChuCarroll at gitlab) *** Software Tools/Math Geek - Software Engineer at Gitlab *** Work Email: mcarroll@gitlab.com / markchucarroll@fastmail.com *** Personal Blog: http://goodmath.org/blog / Personal email: markcc@gmail.com