aboutsummaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorAndreas Ericsson <ae@op5.se>2008-09-07 22:15:29 +0200
committerJunio C Hamano <gitster@pobox.com>2008-09-07 15:22:24 -0700
commitaf9ce1ffc6de9774e90a91f27fb1febd027f74f1 (patch)
tree494653079c09661aea964bde5a8723240fa67beb /diff.c
parentec3a4ba519c0012d58584d23f407c302e7b80eb6 (diff)
downloadgit-af9ce1ffc6de9774e90a91f27fb1febd027f74f1.tar.gz
git-af9ce1ffc6de9774e90a91f27fb1febd027f74f1.tar.xz
Teach "git diff -p" to locate PHP class methods
Otherwise it will always print the class-name rather than the name of the function inside that class. While we're at it, reorder the gitattributes manpage to list the built-in funcname pattern names in alphabetical order. Signed-off-by: Andreas Ericsson <ae@op5.se> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/diff.c b/diff.c
index cbd151bbc..e7afbe28c 100644
--- a/diff.c
+++ b/diff.c
@@ -1402,6 +1402,7 @@ static struct builtin_funcname_pattern {
"\\|"
"^\\(.*=[ \t]*\\(class\\|record\\).*\\)$"
},
+ { "php", "^[\t ]*\\(\\(function\\|class\\).*\\)" },
{ "python", "^\\s*\\(\\(class\\|def\\)\\s.*\\)$" },
{ "ruby", "^\\s*\\(\\(class\\|module\\|def\\)\\s.*\\)$" },
{ "tex", "^\\(\\\\\\(\\(sub\\)*section\\|chapter\\|part\\)\\*\\{0,1\\}{.*\\)$" },