{"thread":{"id":"56413","subject":"[PATCH] userdiff: support enum keyword in PHP hunk header","startedAt":"2021-08-31T06:01:36Z","lastAt":"2021-08-31T19:15:36Z","messageCount":2,"participants":["USAMI Kenta via GitGitGadget","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"434234","messageId":"pull.1082.git.git.1630389685997.gitgitgadget@gmail.com","threadId":"56413","inReplyTo":null,"subject":"[PATCH] userdiff: support enum keyword in PHP hunk header","fromName":"USAMI Kenta via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-08-31T06:01:25Z","receivedAt":"2021-08-31T06:01:36Z","isPatch":true,"sender":{"key":"name:USAMI Kenta","avatar":null},"body":"From: USAMI Kenta <tadsan@zonu.me>\n\n\"enum\" keyword will be introduced in PHP 8.1.\nhttps://wiki.php.net/rfc/enumerations\n\nSigned-off-by: USAMI Kenta <tadsan@zonu.me>\n---\n    userdiff: support enum keyword in PHP hunk header\n    \n    \"enum\" keyword will be introduced in PHP 8.1.\n    https://wiki.php.net/rfc/enumerations\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1082%2Fzonuexe%2Ffeature%2Fuserdiff-php-enum-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1082/zonuexe/feature/userdiff-php-enum-v1\nPull-Request: https://github.com/git/git/pull/1082\n\n t/t4018/php-enum | 4 ++++\n userdiff.c       | 2 +-\n 2 files changed, 5 insertions(+), 1 deletion(-)\n create mode 100644 t/t4018/php-enum\n\ndiff --git a/t/t4018/php-enum b/t/t4018/php-enum\nnew file mode 100644\nindex 00000000000..91a69c1a2bc\n--- /dev/null\n+++ b/t/t4018/php-enum\n@@ -0,0 +1,4 @@\n+enum RIGHT: string\n+{\n+    case Foo = 'ChangeMe';\n+}\ndiff --git a/userdiff.c b/userdiff.c\nindex d9b2ba752f0..d9ec484d535 100644\n--- a/userdiff.c\n+++ b/userdiff.c\n@@ -214,7 +214,7 @@ PATTERNS(\"perl\",\n \t \"|<<|<>|<=>|>>\"),\n PATTERNS(\"php\",\n \t \"^[\\t ]*(((public|protected|private|static|abstract|final)[\\t ]+)*function.*)$\\n\"\n-\t \"^[\\t ]*((((final|abstract)[\\t ]+)?class|interface|trait).*)$\",\n+\t \"^[\\t ]*((((final|abstract)[\\t ]+)?class|enum|interface|trait).*)$\",\n \t /* -- */\n \t \"[a-zA-Z_][a-zA-Z0-9_]*\"\n \t \"|[-+0-9.e]+|0[xXbB]?[0-9a-fA-F]+\"\n\nbase-commit: c4203212e360b25a1c69467b5a8437d45a373cac\n-- \ngitgitgadget\n"},{"id":"434322","messageId":"xmqqh7f5toh7.fsf@gitster.g","threadId":"56413","inReplyTo":"pull.1082.git.git.1630389685997.gitgitgadget@gmail.com","subject":"Re: [PATCH] userdiff: support enum keyword in PHP hunk header","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2021-08-31T19:15:32Z","receivedAt":"2021-08-31T19:15:36Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"USAMI Kenta via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n\n> From: USAMI Kenta <tadsan@zonu.me>\n>\n> \"enum\" keyword will be introduced in PHP 8.1.\n> https://wiki.php.net/rfc/enumerations\n>\n> Signed-off-by: USAMI Kenta <tadsan@zonu.me>\n> ---\n>     userdiff: support enum keyword in PHP hunk header\n>     \n>     \"enum\" keyword will be introduced in PHP 8.1.\n>     https://wiki.php.net/rfc/enumerations\n\nI no longer speak PHP, but this looks sensible to me.\n\nThanks, will queue.\n"}]}