Re: [PATCH] t2400: Fix test failures when using grep 2.5
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 17, 2023, 02:38 UTC
- Message-ID
- <xmqqo7kbjm80.fsf@gitster.g>
- In-Reply-To
- <3f3a3f5b-70fd-ec3f-acbb-d585b5eb6cbc@gmail.com>
Phillip Wood <phillip.wood123@gmail.com> writes:
> One thing I forgot to mention was that I think it would be better to > explain in the commit message that "\s" etc. are not part of POSIX > EREs and that is why they do not work.
Yes, that is a very good point. We have been burned by regular expression implementations that use or do not use "enhanced" bit in the recent past, IIRC.
Show 6 quoted lines
> I think it might be better to just diagnose if HEAD is a dangling > symbolic-ref or contains an invalid oid and leave it at that. See the > documentation in refs.h for refs_resolve_ref_unsafe() for how to check > if HEAD is a dangling symbolic ref - if rego_get_oid(repo, "HEAD") > fails and it is not a dangling symbolic ref then it contains an > invalid oid.
Sounds doable and sensible. If we can easily test it without peeking into the filesystem, that would be very good.
Thanks.