summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2008-07-31 07:21:48 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-08-02 22:38:14 (GMT)
commitad8c1d92600da963692d57c213979e638c357f1a (patch)
tree2fd7db3089b9b0351bcbdb100cf97246a6368f16 /diff.c
parent5cbef01aab58e6d1feb0ea7b80c9111c2b40e561 (diff)
downloadgit-ad8c1d92600da963692d57c213979e638c357f1a.zip
git-ad8c1d92600da963692d57c213979e638c357f1a.tar.gz
git-ad8c1d92600da963692d57c213979e638c357f1a.tar.bz2
diff: add ruby funcname pattern
Provide a regexp that catches class, module and method definitions in Ruby scripts, since the built-in default only finds classes. Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> 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 cbf2547..c253015 100644
--- a/diff.c
+++ b/diff.c
@@ -1381,6 +1381,7 @@ static struct builtin_funcname_pattern {
"[A-Za-z_][A-Za-z_0-9]*\\)\\{2,\\}"
"[ ]*([^;]*\\)$" },
{ "tex", "^\\(\\\\\\(sub\\)*section{.*\\)$" },
+ { "ruby", "^\\s*\\(\\(class\\|module\\|def\\)\\s.*\\)$" },
};
static const char *diff_funcname_pattern(struct diff_filespec *one)