[PATCH] userdiff.c: Add C# async keyword in diff pattern
- From
- Thomas Levesque <thomas.levesque@gmail.com>
- Date
- Mar 8, 2018, 11:05 UTC
- Message-ID
- <0102016205499aff-6779e882-12d1-481e-8594-c02d72aa7165-000000@eu-west-1.amazonses.com>
- In-Reply-To
- <CAPig+cTPMqf1hN-fsaAkdZwCEH94ZPYJbfSE_rcjFCoSobxK5Q@mail.gmail.com>
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> --- userdiff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/userdiff.c b/userdiff.c index dbfb4e13cddce..b92caf42b27be 100644 --- a/userdiff.c +++ b/userdiff.c @@ -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 */ -- https://github.com/git/git/pull/464