diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-12-27 09:19:38 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-12-27 09:19:38 -0800 |
commit | a25e47377d6a1ec1efc6972f2e5e55cf429603a1 (patch) | |
tree | 9fd862f8e50c5876336421e1a115d880ad6c6db4 /userdiff.c | |
parent | 71a5d4bc0e4025b3fbdeed76052b39fcef284e8c (diff) | |
download | git-a25e47377d6a1ec1efc6972f2e5e55cf429603a1.tar.gz |
userdiff/perl: catch BEGIN/END/... and POD as headers
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'userdiff.c')
-rw-r--r-- | userdiff.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/userdiff.c b/userdiff.c index fc2afe33a7..c384b39e4d 100644 --- a/userdiff.c +++ b/userdiff.c @@ -63,7 +63,9 @@ PATTERNS("pascal", "|[^[:space:]]|[\x80-\xff]+"), PATTERNS("perl", "^[ \t]*package .*;\n" - "^[ \t]*sub .* \\{", + "^[ \t]*sub .* \\{\n" + "^[A-Z]+ \\{\n" /* BEGIN, END, ... */ + "^=head[0-9] ", /* POD */ /* -- */ "[[:alpha:]_'][[:alnum:]_']*" "|0[xb]?[0-9a-fA-F_]*" |