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.