From: Avery Pennarun Date: Fri, 1 Aug 2008 21:00:15 +0000 (-0400) Subject: Teach "git diff -p" Pascal/Delphi funcname pattern X-Git-Tag: v1.6.0-rc2~34 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=b50005b79f6c77f9846c3f34ba319675fe489b72;p=git.git Teach "git diff -p" Pascal/Delphi funcname pattern Finds classes, records, functions, procedures, and sections. Most lines need to start at the first column, or else there's no way to differentiate a procedure's definition from its declaration. Signed-off-by: Avery Pennarun Signed-off-by: Junio C Hamano --- diff --git a/diff.c b/diff.c index c253015c5..75a8b1664 100644 --- a/diff.c +++ b/diff.c @@ -1380,6 +1380,12 @@ static struct builtin_funcname_pattern { "^[ ]*\\(\\([ ]*" "[A-Za-z_][A-Za-z_0-9]*\\)\\{2,\\}" "[ ]*([^;]*\\)$" }, + { "pascal", "^\\(\\(procedure\\|function\\|constructor\\|" + "destructor\\|interface\\|implementation\\|" + "initialization\\|finalization\\)[ \t]*.*\\)$" + "\\|" + "^\\(.*=[ \t]*\\(class\\|record\\).*\\)$" + }, { "tex", "^\\(\\\\\\(sub\\)*section{.*\\)$" }, { "ruby", "^\\s*\\(\\(class\\|module\\|def\\)\\s.*\\)$" }, };