git/list[1] front-page[2] threads[3] people[4] search[5] about
wed 2026-10-07 18:02 UTC

Re: [PATCH] t1006: fix %(rest) test for object names with whitespace

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 20, 2026, 03:30 UTC
Message-ID
<xmqqldgo148k.fsf@gitster.g>
In-Reply-To
<xmqqzf5431ek.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
Show 7 quoted lines
> I agree that fixing underlying issue would be a much more valuable
> outcome of resolving that FIXME comment, but isn't the approach to
> give $object_name fundamentally incompatible with %(rest), making
> the issue something %(rest) implementation cannot "fix", is it?
>
> That is a part of the reason why I said I am dubious about the FIXME
> comment in my comment.
Actually, it is worse than that.

We already _promise_ to chop the input line at the first whitespace boundary in our documentation when we use %(rest), so there is nothing we can do to "fix" on the implementation side. What your original tested, i.e., if the early part of the input up to the first whitespace does *not* name an object, then the test cannot succeed (not just that, the test should fail, unless it happens to name another valid object), is the advertised behaviour of this feature.

Thanks.
Previous: Junio C HamanoNext: Deveshi Dwivedi
Message 5 of 6 in “t1006: fix %(rest) test for object names with whitespace”
  1. t1006: fix %(rest) test for object names with whitespaceDeveshi Dwivedi, Feb 19, 2026
  2. Junio C HamanoFeb 19, 2026
  3. Victoria DyeFeb 19, 2026
  4. Junio C HamanoFeb 19, 2026
  5. Junio C HamanoFeb 20, 2026
  6. Deveshi DwivediFeb 20, 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.