The patch appends userdiff.c file in order to support R programming language function header. This will be useful for those who use Git for versioning .R files. Signed-off-by: Rodrigo Carvalho <rodrigorsdc@xxxxxxxxx> --- userdiff.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/userdiff.c b/userdiff.c index da75625020..d1d31ea67e 100644 --- a/userdiff.c +++ b/userdiff.c @@ -317,6 +317,10 @@ PATTERNS("python", "|[-+0-9.e]+[jJlL]?|0[xX]?[0-9a-fA-F]+[lL]?" "|[-+*/<>%&^|=!]=|//=?|<<=?|>>=?|\\*\\*=?"), /* -- */ +PATTERNS("r", + "^[ \t]*([a-zA-z][a-zA-Z0-9_.]*[ \t]*<-[ \t]*function.*)$", + /* -- */ + "[a-zA-Z_][a-zA-Z0-9_.]*"), PATTERNS("ruby", "^[ \t]*((class|module|def)[ \t].*)$", /* -- */ -- 2.43.0