Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
userdiff/perl: catch BEGIN/END/... and POD as headers
author
Junio C Hamano
<gitster@pobox.com>
Mon, 27 Dec 2010 17:19:38 +0000
(09:19 -0800)
committer
Junio C Hamano
<gitster@pobox.com>
Mon, 27 Dec 2010 17:19:38 +0000
(09:19 -0800)
Signed-off-by: Junio C Hamano <gitster@pobox.com>
userdiff.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
71a5d4b
)
diff --git
a/userdiff.c
b/userdiff.c
index fc2afe33a7640677fbf3a10bbdbec25b023f752c..c384b39e4daf1226a2c13c74dc2a4a2f75b8e63b 100644
(file)
--- 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_]*"