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

Re: [PATCH] ls-tree: do not quote %(path) with -z

From
NCNoam 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?

Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 6 in “ls-tree: do not quote %(path) with -z”
  1. ls-tree: do not quote %(path) with -zNoam Cohen via B4 Relay, Nov 18, 2026
  2. Junio C HamanoNov 18, 2026
  3. Noam CohenNov 18, 2026
  4. Junio C HamanoNov 19, 2026
  5. ls-tree: do not quote %(path) with -zNoam Cohen via B4 Relay, Nov 19, 2026
  6. Junio C HamanoNov 19, 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.