Re: [PATCH] ls-tree: do not quote %(path) with -z
- From
- Noam Cohen <noam@noam.me>
- Date
- Nov 18, 2026, 23:45 UTC
- Message-ID
- <CAJeEYUaJt49oz+Fq7qwWGyB9p=Hibdzd3113FBhbK1RDn3oHug@mail.gmail.com>
- In-Reply-To
- <xmqqcxs120c8.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
Show 7 quoted lines
>> test_expect_success 'setup' ' >> - setup_basic_ls_tree_data >> + setup_basic_ls_tree_data && >> + test_commit נעם >> ' > > Do we have to really use characters outside US-ASCII?
The only US-ASCII bytes that quote_c_style() quotes are control characters, DEL, '"' and '\', and Windows does not allow them in filenames, except for DEL, which felt too obscure to rely on.
We could avoid the filesystem and synthesize the tree with "git mktree" instead, which is what I had at first, but that made the test noticeably more complicated than a test_commit in the setup.
We already have tests that use non-ASCII paths, like t3902, t4012, and others.
Do you think the test should set core.quotePath explicitly, rather than relying on its default?
Also, should I just drop the test, or add a similar one for ls-files --format?