From: Nguyen Thai Ngoc Duy Date: Thu, 16 Dec 2010 00:23:13 GMT Subject: Re: [PATCH] get_sha1: handle special case $commit^{/} Message-ID: In-Reply-To: <7v8vzqppo3.fsf@alter.siamese.dyndns.org> 2010/12/16 Junio C Hamano : > Nguyễn Thái Ngọc Duy 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