From: Ed Maste Date: Fri, 13 Dec 2019 17:55:35 +0000 (+0000) Subject: userdiff: remove empty subexpression from elixir regex X-Git-Tag: v2.25.0-rc0~12^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d1b1384d6163efb85c3a93ee535cd795d92fec21;p=thirdparty%2Fgit.git 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 Reviewed-by: Jeff King Helped-by: Johannes Sixt Signed-off-by: Junio C Hamano --- 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 */