diff options
author | Avery Pennarun <apenwarr@gmail.com> | 2008-08-01 17:00:15 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-08-02 15:39:35 -0700 |
commit | b50005b79f6c77f9846c3f34ba319675fe489b72 (patch) | |
tree | d88724db75a089f217a4e85ea6ccbb5e1439a01a /diff.c | |
parent | ad8c1d92600da963692d57c213979e638c357f1a (diff) | |
download | git-b50005b79f6c77f9846c3f34ba319675fe489b72.tar.gz git-b50005b79f6c77f9846c3f34ba319675fe489b72.tar.xz |
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 <apenwarr@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff.c')
-rw-r--r-- | diff.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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.*\\)$" }, }; |