diff options
| author | Kana Natsuno <dev@whileimautomaton.net> | 2018-07-03 22:15:40 +0900 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2018-07-06 14:59:28 -0700 |
| commit | 1ab631647e3addd247c5482e8a3d4c9df7978c62 (patch) | |
| tree | 1bbc145b8273ce532ce87863c235fdce1162cf47 /userdiff.c | |
| parent | t4018: add missing test cases for PHP (diff) | |
| download | git-1ab631647e3addd247c5482e8a3d4c9df7978c62.tar.gz git-1ab631647e3addd247c5482e8a3d4c9df7978c62.zip | |
userdiff: support new keywords in PHP hunk header
Recent version of PHP supports interface, trait, abstract class and
final class. This patch fixes the PHP hunk header regexp to support
all of these keywords.
Signed-off-by: Kana Natsuno <dev@whileimautomaton.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to '')
| -rw-r--r-- | userdiff.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/userdiff.c b/userdiff.c index a69241b25d..36af25e7f9 100644 --- a/userdiff.c +++ b/userdiff.c @@ -114,7 +114,7 @@ PATTERNS("perl", "|<<|<>|<=>|>>"), PATTERNS("php", "^[\t ]*(((public|protected|private|static)[\t ]+)*function.*)$\n" - "^[\t ]*(class.*)$", + "^[\t ]*((((final|abstract)[\t ]+)?class|interface|trait).*)$", /* -- */ "[a-zA-Z_][a-zA-Z0-9_]*" "|[-+0-9.e]+|0[xXbB]?[0-9a-fA-F]+" |
