summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2014-01-27 10:23:55 -0800
committerRussell Belfer <rb@github.com>2014-01-27 10:23:55 -0800
commit4115987739fb9cc4dd82edd9998db6dbb6bc9d95 (patch)
tree001554ae5b0ddba6b2f0dffcbd02bca5da6c8cbc
parent7cc001cefb787ddacb53c74a94173674ac6bd587 (diff)
downloadlibgit2-4115987739fb9cc4dd82edd9998db6dbb6bc9d95.tar.gz
Got permission from Gustaf for userdiff patterns
-rw-r--r--git.git-authors1
-rw-r--r--src/userdiff.h4
2 files changed, 5 insertions, 0 deletions
diff --git a/git.git-authors b/git.git-authors
index 7e53d66a9..7c72c4bf6 100644
--- a/git.git-authors
+++ b/git.git-authors
@@ -49,6 +49,7 @@ ok Brian Gernhardt <benji@silverinsanity.com>
ok Christian Couder <chriscool@tuxfamily.org>
ok Daniel Barkalow <barkalow@iabervon.org>
ok Florian Forster <octo@verplant.org>
+ok Gustaf Hendeby <hendeby@isy.liu.se>
ok Holger Weiss <holger@zedat.fu-berlin.de>
ok Jeff King <peff@peff.net>
ok Johannes Schindelin <Johannes.Schindelin@gmx.de>
diff --git a/src/userdiff.h b/src/userdiff.h
index 318761567..93b4d0d58 100644
--- a/src/userdiff.h
+++ b/src/userdiff.h
@@ -80,6 +80,10 @@ PATTERNS("java",
"|[-+*/<>%&^|=!]="
"|--|\\+\\+|<<=?|>>>?=?|&&|\\|\\|"),
+PATTERNS("matlab",
+ "^[[:space:]]*((classdef|function)[[:space:]].*)$|^%%[[:space:]].*$",
+ "[a-zA-Z_][a-zA-Z0-9_]*|[-+0-9.e]+|[=~<>]=|\\.[*/\\^']|\\|\\||&&"),
+
PATTERNS("objc",
/* Negate C statements that can look like functions */
"!^[ \t]*(do|for|if|else|return|switch|while)\n"