]> git.ipfire.org Git - thirdparty/git.git/commit - userdiff.c
diff: Support visibility modifiers in the PHP hunk header regexp
authorBjörn Steinbrink <B.Steinbrink@gmx.de>
Sun, 23 May 2010 18:05:40 +0000 (20:05 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 27 May 2010 14:12:07 +0000 (07:12 -0700)
commit6d2f208c3dd39493f4d45ea67c55a1b7fe06626a
treeac713eae000afe4ba92fd2c641c389f307b202b7
parente498257d650529812ffe1872b3cd62e2bd604287
diff: Support visibility modifiers in the PHP hunk header regexp

Starting with PHP5, class methods can have a visibility modifier, which
caused the methods not to be matched by the existing regexp, so extend
the regexp to match those modifiers. And while we're at it, allow the
"static" modifier as well.

Since the "static" modifier can appear either before or after the
visibility modifier, let's just allow any number of modifiers to appear
in any order, as that simplifies the regexp and shouldn't cause any
false positives.

Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
userdiff.c