Re: [PATCH] get_sha1: handle special case $commit^{/}
- From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
- Date
- Dec 16, 2010, 00:23 UTC
- Message-ID
- <AANLkTim3Y5jqwc9=StOLgvJYPPJS7B84Otz0=v1dAbc1@mail.gmail.com>
- In-Reply-To
- <7v8vzqppo3.fsf@alter.siamese.dyndns.org>
2010/12/16 Junio C Hamano <gitster@pobox.com>:
Show 11 quoted lines
> Nguyễn Thái Ngọc Duy <pclouds@gmail.com> writes:
>
>> Empty regex pattern should always match. But the exact behavior of
>> regexec() may vary. Because it always matches anyway, we can just
>> return 'matched' without calling regex machinery.
>
> Hmm, I just noticed that "git grep -e '' Makefile" fails on FBSD8 for
> the same reason.
>
> I'd prefer a solution that is not about "special case $commit^{/}" but is
> about "work around regcomp that cannot compile an empty regexp".Hmm.. if there is no compilation phase, we can redefine a macro to workaround. Perhaps prefer compat/regex to FBSD's implementation?
-- Duy