]> git.ipfire.org Git - thirdparty/git.git/blobdiff - userdiff.c
submodule: make zero-oid comparison hash function agnostic
[thirdparty/git.git] / userdiff.c
index a69241b25ddaff5b61380aa8b451a6fcb833502c..f565f6731d1336c761b527a8ce8a62a21b453dcc 100644 (file)
@@ -114,7 +114,7 @@ PATTERNS("perl",
         "|<<|<>|<=>|>>"),
 PATTERNS("php",
         "^[\t ]*(((public|protected|private|static)[\t ]+)*function.*)$\n"
-        "^[\t ]*(class.*)$",
+        "^[\t ]*((((final|abstract)[\t ]+)?class|interface|trait).*)$",
         /* -- */
         "[a-zA-Z_][a-zA-Z0-9_]*"
         "|[-+0-9.e]+|0[xXbB]?[0-9a-fA-F]+"
@@ -278,8 +278,7 @@ struct userdiff_driver *userdiff_find_by_path(const char *path)
                check = attr_check_initl("diff", NULL);
        if (!path)
                return NULL;
-       if (git_check_attr(path, check))
-               return NULL;
+       git_check_attr(&the_index, path, check);
 
        if (ATTR_TRUE(check->items[0].value))
                return &driver_true;