summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorLibravatar Kirill Smelkov <kirr@mns.spb.ru>2008-08-20 19:57:07 +0400
committerLibravatar Junio C Hamano <gitster@pobox.com>2008-08-20 23:53:33 -0700
commit7c17205b64a0e668d8a6e59109043bd4f2af3a0c (patch)
tree97d07ca394443b596bd5ffc236550532be732125 /diff.c
parentMerge branch 'ml/submodule-foreach' (diff)
downloadtgif-7c17205b64a0e668d8a6e59109043bd4f2af3a0c.tar.xz
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>
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 5923fe281b..2215416441 100644
--- a/diff.c
+++ b/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.*\\)$" },
};