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>
Andreas Ericsson committed
Sep 7, 2008 at 22:15 UTC
af9ce1ffc6de9774e90a91f27fb1febd027f74f1
2 files changed
+5
-2
Documentation/gitattributes.txt
+4
-2
@@ -311,18 +311,20 @@ patterns are available:
311
312
- `bibtex` suitable for files with BibTeX coded references.
313
314
+- `html` suitable for HTML/XHTML documents.
315
+
316
- `java` suitable for source code in the Java lanugage.
317
318
- `pascal` suitable for source code in the Pascal/Delphi language.
319
320
+- `php` suitable for source code in the PHP language.
321
+
322
- `python` suitable for source code in the Python language.
323
324
- `ruby` suitable for source code in the Ruby language.
325
326
- `tex` suitable for source code for LaTeX documents.
327
324
-- `html` suitable for HTML/XHTML documents.
325
-
328
329
Performing a three-way merge
330
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff.c
+1
@@ -1402,6 +1402,7 @@ static struct builtin_funcname_pattern {
1402
"\\|"
1403
"^\\(.*=[ \t]*\\(class\\|record\\).*\\)$"
1404
},
1405
+ { "php", "^[\t ]*\\(\\(function\\|class\\).*\\)" },
1406
{ "python", "^\\s*\\(\\(class\\|def\\)\\s.*\\)$" },
1407
{ "ruby", "^\\s*\\(\\(class\\|module\\|def\\)\\s.*\\)$" },
1408
{ "tex", "^\\(\\\\\\(\\(sub\\)*section\\|chapter\\|part\\)\\*\\{0,1\\}{.*\\)$" },