]> git.ipfire.org Git - thirdparty/git.git/blobdiff - userdiff.c
checkout $tree $path: do not clobber local changes in $path not in $tree
[thirdparty/git.git] / userdiff.c
index 234697821d3f0aa285c18903fe8c465cadf071b7..9ebf231ea5ee2e7fd1f71c9557a6537d29428d8d 100644 (file)
@@ -61,6 +61,23 @@ PATTERNS("pascal",
         "|[-+0-9.e]+|0[xXbB]?[0-9a-fA-F]+"
         "|<>|<=|>=|:=|\\.\\."
         "|[^[:space:]]|[\x80-\xff]+"),
+PATTERNS("perl",
+        "^[ \t]*package .*;\n"
+        "^[ \t]*sub .* \\{\n"
+        "^[A-Z]+ \\{\n"        /* BEGIN, END, ... */
+        "^=head[0-9] ",        /* POD */
+        /* -- */
+        "[[:alpha:]_'][[:alnum:]_']*"
+        "|0[xb]?[0-9a-fA-F_]*"
+        /* taking care not to interpret 3..5 as (3.)(.5) */
+        "|[0-9a-fA-F_]+(\\.[0-9a-fA-F_]+)?([eE][-+]?[0-9_]+)?"
+        "|=>|-[rwxoRWXOezsfdlpSugkbctTBMAC>]|~~|::"
+        "|&&=|\\|\\|=|//=|\\*\\*="
+        "|&&|\\|\\||//|\\+\\+|--|\\*\\*|\\.\\.\\.?"
+        "|[-+*/%.^&<>=!|]="
+        "|=~|!~"
+        "|<<|<>|<=>|>>"
+        "|[^[:space:]]"),
 PATTERNS("php",
         "^[\t ]*(((public|protected|private|static)[\t ]+)*function.*)$\n"
         "^[\t ]*(class.*)$",