From: Junio C Hamano Date: Wed, 15 Dec 2010 02:56:31 GMT Subject: Re: [PATCH 3/3] get_sha1: support ref^{/regex} syntax Message-ID: <7v62uvrbfk.fsf@alter.siamese.dyndns.org> In-Reply-To: Nguyen Thai Ngoc Duy 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?