Teach "git diff -p" Python funcname patterns
Find classes, functions, and methods definitions. Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
5630feaf37
commit
7c17205b64
@ -316,6 +316,8 @@ patterns are available:
|
||||
|
||||
- `pascal` suitable for source code in the Pascal/Delphi language.
|
||||
|
||||
- `python` suitable for source code in the Python language.
|
||||
|
||||
- `ruby` suitable for source code in the Ruby language.
|
||||
|
||||
- `tex` suitable for source code for LaTeX documents.
|
||||
|
1
diff.c
1
diff.c
@ -1394,6 +1394,7 @@ static struct builtin_funcname_pattern {
|
||||
},
|
||||
{ "bibtex", "\\(@[a-zA-Z]\\{1,\\}[ \t]*{\\{0,1\\}[ \t]*[^ \t\"@',\\#}{~%]*\\).*$" },
|
||||
{ "tex", "^\\(\\\\\\(\\(sub\\)*section\\|chapter\\|part\\)\\*\\{0,1\\}{.*\\)$" },
|
||||
{ "python", "^\\s*\\(\\(class\\|def\\)\\s.*\\)$" },
|
||||
{ "ruby", "^\\s*\\(\\(class\\|module\\|def\\)\\s.*\\)$" },
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user