Support working-tree-encoding "UTF-16LE-BOM"
[gitweb.git] / userdiff.c
index f3f4be579c9810d0fcf94badd4bf21770b99c91b..46d34cc2a436c6084531d39628d013785700e2ba 100644 (file)
@@ -270,7 +270,8 @@ struct userdiff_driver *userdiff_find_by_name(const char *name) {
        return userdiff_find_by_namelen(name, len);
 }
 
-struct userdiff_driver *userdiff_find_by_path(const char *path)
+struct userdiff_driver *userdiff_find_by_path(struct index_state *istate,
+                                             const char *path)
 {
        static struct attr_check *check;
 
@@ -278,8 +279,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(&the_index, path, check))
-               return NULL;
+       git_check_attr(istate, path, check);
 
        if (ATTR_TRUE(check->items[0].value))
                return &driver_true;