git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Improve diff pattern for PHP files

From
JGJavier Spagnoletti via GitGitGadget <gitgitgadget@gmail.com>
Date
Oct 6, 2020, 10:37 UTC
Message-ID
<pull.864.git.git.1601980656554.gitgitgadget@gmail.com>
From: Javier Spagnoletti <phansys@gmail.com>
Improve the output diff readability for php files by taking into account some missing function modifiers.
Signed-off-by: Javier Spagnoletti <phansys@gmail.com>
---
    Improve diff pattern for PHP files
    
    Improve the output diff readability for php files by taking into account
    some missing function modifiers.
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-864%2Fphansys%2Fuserdiff_php-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-864/phansys/userdiff_php-v1
Pull-Request: https://github.com/git/git/pull/864
 userdiff.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/userdiff.c b/userdiff.c
index 1df884ef0b..a99d84a7e3 100644
--- a/userdiff.c
+++ b/userdiff.c
@@ -143,7 +143,7 @@ PATTERNS("perl",
 	 "|=~|!~"
 	 "|<<|<>|<=>|>>"),
 PATTERNS("php",
-	 "^[\t ]*(((public|protected|private|static)[\t ]+)*function.*)$\n"
+	 "^[\t ]*(((public|protected|private|static|abstract|final)[\t ]+)*function.*)$\n"
 	 "^[\t ]*((((final|abstract)[\t ]+)?class|interface|trait).*)$",
 	 /* -- */
 	 "[a-zA-Z_][a-zA-Z0-9_]*"

base-commit: 47ae905ffb98cc4d4fd90083da6bc8dab55d9ecc
-- 
gitgitgadget
Next: Johannes Sixt
Message 1 of 7 in “Improve diff pattern for PHP files”
  1. Improve diff pattern for PHP filesJavier Spagnoletti via GitGitGadget, Oct 6, 2020
  2. Johannes SixtOct 6, 2020
  3. Junio C HamanoOct 6, 2020
  4. Improve diff pattern for PHP filesJavier Spagnoletti via GitGitGadget, Oct 7, 2020
  5. Junio C HamanoOct 7, 2020
  6. Junio C HamanoOct 7, 2020
  7. userdiff: php: Add "final" and "abstract" to the list of function modifiersJavier Spagnoletti via GitGitGadget, Oct 7, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.