userdiff.c: add C# async keyword in diff pattern
Currently C# async methods are not shown in diff hunk headers. I just added the async keyword to the csharp method pattern so that they are properly detected. Signed-off-by: Thomas Levesque <thomas.levesque@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Thomas Levesque committed
Mar 8, 2018 at 11:05 UTC
a12cec99f8b64a0b99ae6f8a7e4724039406aea3
1 file changed
+1
-1
userdiff.c
+1
-1
@@ -138,7 +138,7 @@ PATTERNS("csharp",
138
/* Keywords */
139
"!^[ \t]*(do|while|for|if|else|instanceof|new|return|switch|case|throw|catch|using)\n"
140
/* Methods and constructors */
141
- "^[ \t]*(((static|public|internal|private|protected|new|virtual|sealed|override|unsafe)[ \t]+)*[][<>@.~_[:alnum:]]+[ \t]+[<>@._[:alnum:]]+[ \t]*\\(.*\\))[ \t]*$\n"
141
+ "^[ \t]*(((static|public|internal|private|protected|new|virtual|sealed|override|unsafe|async)[ \t]+)*[][<>@.~_[:alnum:]]+[ \t]+[<>@._[:alnum:]]+[ \t]*\\(.*\\))[ \t]*$\n"
142
/* Properties */
143
"^[ \t]*(((static|public|internal|private|protected|new|virtual|sealed|override|unsafe)[ \t]+)*[][<>@.~_[:alnum:]]+[ \t]+[@._[:alnum:]]+)[ \t]*$\n"
144
/* Type definitions */