]> git.ipfire.org Git - thirdparty/git.git/commitdiff
userdiff.c: add C# async keyword in diff pattern
authorThomas Levesque <thomas.levesque@gmail.com>
Thu, 8 Mar 2018 11:05:32 +0000 (11:05 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 8 Mar 2018 19:03:32 +0000 (11:03 -0800)
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>
userdiff.c

index dbfb4e13cddceaa44feee51016c9b837f7f4fce1..b92caf42b27bebcb99270cc4a2d1bacf8c28aa3e 100644 (file)
@@ -138,7 +138,7 @@ PATTERNS("csharp",
         /* Keywords */
         "!^[ \t]*(do|while|for|if|else|instanceof|new|return|switch|case|throw|catch|using)\n"
         /* Methods and constructors */
-        "^[ \t]*(((static|public|internal|private|protected|new|virtual|sealed|override|unsafe)[ \t]+)*[][<>@.~_[:alnum:]]+[ \t]+[<>@._[:alnum:]]+[ \t]*\\(.*\\))[ \t]*$\n"
+        "^[ \t]*(((static|public|internal|private|protected|new|virtual|sealed|override|unsafe|async)[ \t]+)*[][<>@.~_[:alnum:]]+[ \t]+[<>@._[:alnum:]]+[ \t]*\\(.*\\))[ \t]*$\n"
         /* Properties */
         "^[ \t]*(((static|public|internal|private|protected|new|virtual|sealed|override|unsafe)[ \t]+)*[][<>@.~_[:alnum:]]+[ \t]+[@._[:alnum:]]+)[ \t]*$\n"
         /* Type definitions */