| 526 | } |
| 527 | |
| 528 | struct userdiff_driver *userdiff_find_by_path(struct index_state *istate, |
| 529 | const char *path) |
| 530 | { |
| 531 | static struct attr_check *check; |
| 532 | |
| 533 | if (!check) |
| 534 | check = attr_check_initl("diff", NULL); |
| 535 | if (!path) |
| 536 | return NULL; |
| 537 | git_check_attr(istate, path, check); |
| 538 | |
| 539 | if (ATTR_TRUE(check->items[0].value)) |
| 540 | return &driver_true; |
| 541 | if (ATTR_FALSE(check->items[0].value)) |
| 542 | return &driver_false; |
| 543 | if (ATTR_UNSET(check->items[0].value)) |
| 544 | return NULL; |
| 545 | return userdiff_find_by_name(check->items[0].value); |
| 546 | } |
| 547 | |
| 548 | struct userdiff_driver *userdiff_get_textconv(struct repository *r, |
| 549 | struct userdiff_driver *driver) |
no test coverage detected