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>
This commit is contained in:

committed by
Junio C Hamano

parent
ec3a4ba519
commit
af9ce1ffc6
1
diff.c
1
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\\}{.*\\)$" },
|
||||
|
Reference in New Issue
Block a user