git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] precompose_utf8: use a flex array for d_name

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 3, 2026, 08:39 UTC
Message-ID
<xmqq8q7sjwkl.fsf@gitster.g>
In-Reply-To
<20260703050800.GA29216@tb-raspi4>
Torsten Bögershausen <tboegi@web.de> writes:
> Nice, thanks for the patch.  One minor nit/question: Do we need a
> test_have_prereq PERL in t/t3910 ?
Good question.
Show 11 quoted lines
>> +test_expect_success "status with long non-ASCII filename" '
>> +	test_when_finished "rm -rf long-utf8-status" &&
>> +	git init long-utf8-status &&
>> +	(
>> +		cd long-utf8-status &&
>> +		test "$(git config --bool core.precomposeunicode)" = true &&
>> +		long_utf8_name=$(
>> +			perl -e "print q(a) x 249, qq(\342\200\224) x 3, q(.md)"
>> +		) &&
>> +		test "$(printf "%s" "$long_utf8_name" | wc -c | tr -d " ")" = 261 &&
>> +		printf "content\n" >"$long_utf8_name" &&

I would say that if we are going to use this construct as-is, then we do need the prereq.

But as far as I can see, this is mostly to create a very long filename, which does not require perl at all, with 9 bytes of binary which could be easily done with printf with the ame backslash notation.

So, if we can fix the test, that would be preferrable.
Thanks.
Show 8 quoted lines
>> +		git status --porcelain=v1 >actual
>> +	)
>> +'
>> +
>>  test_expect_failure 'handle existing decomposed filenames' '
>>  	echo content >"verbatim.$Adiarnfd" &&
>>  	git -c core.precomposeunicode=false add "verbatim.$Adiarnfd" &&
>> 
Previous: Torsten BögershausenNext: Patrick Steinhardt
Message 3 of 6 in “precompose_utf8: use a flex array for d_name”
  1. precompose_utf8: use a flex array for d_nameIhar Hrachyshka, Jul 3, 2026
  2. Torsten BögershausenJul 3, 2026
  3. Junio C HamanoJul 3, 2026
  4. Patrick SteinhardtJul 3, 2026
  5. Ihar HrachyshkaJul 3, 2026
  6. precompose_utf8: use a flex array for d_nameIhar Hrachyshka, Jul 4, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.