git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@linux-m68k.org>
To: Jeff King <peff@peff.net>
Cc: Olly Betts <olly@survex.com>,  Junio C Hamano <gitster@pobox.com>,
	git@vger.kernel.org
Subject: Re: git grep: ^$ false match at end of file
Date: Fri, 10 Jan 2025 13:59:18 +0100	[thread overview]
Message-ID: <87r05ahljt.fsf@igel.home> (raw)
In-Reply-To: <20250110120223.GC1014503@coredump.intra.peff.net> (Jeff King's message of "Fri, 10 Jan 2025 07:02:23 -0500")

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."

  reply	other threads:[~2025-01-10 12:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-09 23:52 git grep: ^$ false match at end of file Olly Betts
2025-01-10 11:43 ` Jeff King
2025-01-10 12:02   ` Jeff King
2025-01-10 12:59     ` Andreas Schwab [this message]
2025-01-13  6:26       ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r05ahljt.fsf@igel.home \
    --to=schwab@linux-m68k.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=olly@survex.com \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).