Subject: Re: [PATCH] t2400: Fix test failures when using grep 2.5

From: Junio C Hamano <[email-masked]>
Date: Sun, 16 Jul 2023 19:38:55 -0700

Phillip Wood <[email-masked]> 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.

> 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.