| 5076 | } |
| 5077 | |
| 5078 | static void run_diffstat(struct diff_filepair *p, struct diff_options *o, |
| 5079 | struct diffstat_t *diffstat) |
| 5080 | { |
| 5081 | const char *name; |
| 5082 | const char *other; |
| 5083 | |
| 5084 | if (!o->ignore_driver_algorithm) { |
| 5085 | struct userdiff_driver *drv = userdiff_find_by_path(o->repo->index, |
| 5086 | p->one->path); |
| 5087 | |
| 5088 | if (drv && drv->algorithm) |
| 5089 | set_diff_algorithm(o, drv->algorithm); |
| 5090 | } |
| 5091 | |
| 5092 | if (DIFF_PAIR_UNMERGED(p)) { |
| 5093 | /* unmerged */ |
| 5094 | builtin_diffstat(p->one->path, NULL, NULL, NULL, |
| 5095 | diffstat, o, p); |
| 5096 | return; |
| 5097 | } |
| 5098 | |
| 5099 | name = p->one->path; |
| 5100 | other = (strcmp(name, p->two->path) ? p->two->path : NULL); |
| 5101 | |
| 5102 | if (o->prefix_length) |
| 5103 | strip_prefix(o->prefix_length, &name, &other); |
| 5104 | |
| 5105 | diff_fill_oid_info(p->one, o->repo->index); |
| 5106 | diff_fill_oid_info(p->two, o->repo->index); |
| 5107 | |
| 5108 | builtin_diffstat(name, other, p->one, p->two, |
| 5109 | diffstat, o, p); |
| 5110 | } |
| 5111 | |
| 5112 | static void run_checkdiff(struct diff_filepair *p, struct diff_options *o) |
| 5113 | { |
no test coverage detected