git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Ed Maste <emaste@freebsd.org>
Cc: Johannes Sixt <j6t@kdbg.org>,
	git@vger.kernel.org, Jeff King <peff@peff.net>,
	lukasz@niemier.pl
Subject: Re: [PATCH v2] userdiff: remove empty subexpression from elixir regex
Date: Fri, 13 Dec 2019 12:23:59 -0800	[thread overview]
Message-ID: <xmqqzhfwht40.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <CAPyFy2B_P7qJ+ocg8rzNWEZWo2uKzaZsfYRvvhwUbAXv2AB6pg@mail.gmail.com> (Ed Maste's message of "Fri, 13 Dec 2019 10:58:40 -0500")

Ed Maste <emaste@freebsd.org> writes:

>> > Add /* -- */ to make things more clear and be consistent with other
>> > patterns.
>>
>> This text would be nice to have in the commit message.
>
> Ah, I didn't think it was remarkable (it's consistent with all of the
> existing entries) but the change is indeed broader than what the
> commit message implies. I'm happy to send a v3 with an amended commit
> message if that's desired.

Let's save one round-trip, then.  Here is what I will queue on the
'pu' branch.

Thanks, all.

-- >8 --
From: Ed Maste <emaste@FreeBSD.org>
Date: Fri, 13 Dec 2019 17:55:35 +0000
Subject: [PATCH] userdiff: remove empty subexpression from elixir regex

The regex failed to compile on FreeBSD.

Also add /* -- */ mark to separate the two regex entries given to
the PATTERNS() macro, to make it consistent with patterns for other
content types.

Signed-off-by: Ed Maste <emaste@FreeBSD.org>
Reviewed-by: Jeff King <peff@peff.net>
Helped-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 userdiff.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/userdiff.c b/userdiff.c
index 577053c10a..0eb34bcd76 100644
--- a/userdiff.c
+++ b/userdiff.c
@@ -34,8 +34,9 @@ PATTERNS("dts",
 	 "|[-+*/%&^|!~]|>>|<<|&&|\\|\\|"),
 PATTERNS("elixir",
 	 "^[ \t]*((def(macro|module|impl|protocol|p)?|test)[ \t].*)$",
+	 /* -- */
 	 /* Atoms, names, and module attributes */
-	 "|[@:]?[a-zA-Z0-9@_?!]+"
+	 "[@:]?[a-zA-Z0-9@_?!]+"
 	 /* Numbers with specific base */
 	 "|[-+]?0[xob][0-9a-fA-F]+"
 	 /* Numbers */
-- 
2.24.1-664-g198078bb5a




  reply	other threads:[~2019-12-13 20:24 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-13 17:39 [PATCH] userdiff: remove empty subexpression from elixir regex Ed Maste
2019-12-13 17:45 ` Jeff King
2019-12-13 14:11   ` Ed Maste
2019-12-13 17:55 ` [PATCH v2] " Ed Maste
2019-12-13 18:18   ` Jeff King
2019-12-13 19:24   ` Johannes Sixt
2019-12-13 15:58     ` Ed Maste
2019-12-13 20:23       ` Junio C Hamano [this message]
2019-12-13 20:59 ` Numbers with specific base (was: [PATCH] userdiff: remove empty subexpression from elixir regex) Achim Gratz
2019-12-13 22:00   ` Numbers with specific base Junio C Hamano

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=xmqqzhfwht40.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=emaste@freebsd.org \
    --cc=git@vger.kernel.org \
    --cc=j6t@kdbg.org \
    --cc=lukasz@niemier.pl \
    --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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).