From: Andreas Schwab Date: Fri, 10 Jan 2025 12:59:18 GMT Subject: Re: git grep: ^$ false match at end of file Message-ID: <87r05ahljt.fsf@igel.home> In-Reply-To: <20250110120223.GC1014503@coredump.intra.peff.net> On Jan 10 2025, Jeff King wrote: > but it is weird to me that patmatch() will match "^$" to the end of the > buffer at all. It is just calling regexec_buf() behind the scenes, so I > guess this is just a weird special case there, and may even depend on > the regex implementation. Shouldn't the matcher be called with REG_NOTEOL in that case? -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."