Re: [PATCH 3/3] get_sha1: support ref^{/regex} syntax
On Wed, Dec 15, 2010 at 9:56 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 13 quoted lines
> Nguyen Thai Ngoc Duy <pclouds@gmail.com> writes:
>
>> Perhaps we should just reject this case. No sane body would ever use it.
>
> I'd have to say that dismissing before even trying is not a very
> disciplined attitude.
>
> Shouldn't an empty regexp simply match everything? Even on FBSD8,
>
> $ grep '' /etc/passwd
>
> seems to show everything. How hard would it be to do this in the codepath
> we are discussing?
To make '' match everything is easy. I'll cook up something when I get home.
--
Duy