summaryrefslogtreecommitdiff
path: root/userdiff.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-06-13 11:22:05 -0700
committerJunio C Hamano <gitster@pobox.com>2010-06-13 11:22:05 -0700
commit9559910cac77526a95dd5dca93a2e3e6d290c5b9 (patch)
treecc54ed8304998eecc379db3764e0cb6de1931eff /userdiff.c
parente391fdfc69bd64e11f31416c38ab491a04c0ffa0 (diff)
parent6d2f208c3dd39493f4d45ea67c55a1b7fe06626a (diff)
downloadgit-9559910cac77526a95dd5dca93a2e3e6d290c5b9.tar.gz
Merge branch 'bs/userdiff-php'
* bs/userdiff-php: diff: Support visibility modifiers in the PHP hunk header regexp
Diffstat (limited to 'userdiff.c')
-rw-r--r--userdiff.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/userdiff.c b/userdiff.c
index 67003fbb23..c49cc1b67e 100644
--- a/userdiff.c
+++ b/userdiff.c
@@ -45,7 +45,9 @@ PATTERNS("pascal",
"|[-+0-9.e]+|0[xXbB]?[0-9a-fA-F]+"
"|<>|<=|>=|:=|\\.\\."
"|[^[:space:]]|[\x80-\xff]+"),
-PATTERNS("php", "^[\t ]*((function|class).*)",
+PATTERNS("php",
+ "^[\t ]*(((public|protected|private|static)[\t ]+)*function.*)$\n"
+ "^[\t ]*(class.*)$",
/* -- */
"[a-zA-Z_][a-zA-Z0-9_]*"
"|[-+0-9.e]+|0[xXbB]?[0-9a-fA-F]+"