From: Junio C Hamano Date: Sun, 11 Dec 2022 03:34:17 GMT Subject: Re: [PATCH v3] line-range: Fix infinite loop bug with degenerate '$' regex Message-ID: In-Reply-To: Junio C Hamano writes: > Lars Kellogg-Stedman writes: > >> When the -L argument to "git log" is passed the degenerate regular >> expression "$" (as in "-L :$:line-range.c"), this results in an >> infinite loop in find_funcname_matching_regexp(). > > Is "matching an empty line" the only way a regular expression can be > a "degenerate" one? If not, perhaps being a bit more explicit would > help the readers, e.g. > > ... a regular expression that matches any line, even an empty > one, such as "-L :$:line-range.c", this results in ... I forgot to point out that the above comment on "degenerate" applies equally to the commit title (which matters more). Also, please do not upcase the first word after ":" on the title line. Thanks.