| 1483 | } |
| 1484 | |
| 1485 | void diff_tree_combined(const struct object_id *oid, |
| 1486 | const struct oid_array *parents, |
| 1487 | struct rev_info *rev) |
| 1488 | { |
| 1489 | struct diff_options *opt = &rev->diffopt; |
| 1490 | struct diff_options diffopts; |
| 1491 | struct combine_diff_path *p, *paths; |
| 1492 | int i, num_paths, needsep, show_log_first, num_parent = parents->nr; |
| 1493 | int need_generic_pathscan; |
| 1494 | |
| 1495 | if (opt->ignore_regex_nr) |
| 1496 | die("combined diff and '%s' cannot be used together", |
| 1497 | "--ignore-matching-lines"); |
| 1498 | if (opt->close_file) |
| 1499 | die("combined diff and '%s' cannot be used together", |
| 1500 | "--output"); |
| 1501 | |
| 1502 | /* nothing to do, if no parents */ |
| 1503 | if (!num_parent) |
| 1504 | return; |
| 1505 | |
| 1506 | show_log_first = !!rev->loginfo && !rev->no_commit_id; |
| 1507 | needsep = 0; |
| 1508 | if (show_log_first) { |
| 1509 | show_log(rev); |
| 1510 | |
| 1511 | if (rev->verbose_header && opt->output_format && |
| 1512 | opt->output_format != DIFF_FORMAT_NO_OUTPUT && |
| 1513 | !commit_format_is_empty(rev->commit_format)) |
| 1514 | printf("%s%c", diff_line_prefix(opt), |
| 1515 | opt->line_termination); |
| 1516 | } |
| 1517 | |
| 1518 | diffopts = *opt; |
| 1519 | copy_pathspec(&diffopts.pathspec, &opt->pathspec); |
| 1520 | diffopts.flags.allow_external = 0; |
| 1521 | if (!opt->flags.no_recursive_diff_tree_combined) |
| 1522 | diffopts.flags.recursive = 1; |
| 1523 | |
| 1524 | /* find set of paths that everybody touches |
| 1525 | * |
| 1526 | * NOTE |
| 1527 | * |
| 1528 | * Diffcore transformations are bound to diff_filespec and logic |
| 1529 | * comparing two entries - i.e. they do not apply directly to combine |
| 1530 | * diff. |
| 1531 | * |
| 1532 | * If some of such transformations is requested - we launch generic |
| 1533 | * path scanning, which works significantly slower compared to |
| 1534 | * simultaneous all-trees-in-one-go scan in find_paths_multitree(). |
| 1535 | * |
| 1536 | * TODO some of the filters could be ported to work on |
| 1537 | * combine_diff_paths - i.e. all functionality that skips paths, so in |
| 1538 | * theory, we could end up having only multitree path scanning. |
| 1539 | * |
| 1540 | * NOTE please keep this semantically in sync with diffcore_std() |
| 1541 | */ |
| 1542 | need_generic_pathscan = opt->skip_stat_unmatch || |
no test coverage detected