]> git.ipfire.org Git - thirdparty/git.git/commitdiff
userdiff: remove empty subexpression from elixir regex
authorEd Maste <emaste@FreeBSD.org>
Fri, 13 Dec 2019 17:55:35 +0000 (17:55 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 13 Dec 2019 20:20:48 +0000 (12:20 -0800)
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

index 577053c10ab72b28b83b1518825a99a7f6016e8e..0eb34bcd76b4b8efd76bfefbcef253b6cc0ffeb8 100644 (file)
@@ -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 */