| 7481 | } |
| 7482 | |
| 7483 | void diffcore_std(struct diff_options *options) |
| 7484 | { |
| 7485 | int output_formats_to_prefetch = DIFF_FORMAT_DIFFSTAT | |
| 7486 | DIFF_FORMAT_NUMSTAT | |
| 7487 | DIFF_FORMAT_PATCH | |
| 7488 | DIFF_FORMAT_SHORTSTAT | |
| 7489 | DIFF_FORMAT_DIRSTAT; |
| 7490 | |
| 7491 | /* |
| 7492 | * Check if the user requested a blob-data-requiring diff output and/or |
| 7493 | * break-rewrite detection (which requires blob data). If yes, prefetch |
| 7494 | * the diff pairs. |
| 7495 | * |
| 7496 | * If no prefetching occurs, diffcore_rename() will prefetch if it |
| 7497 | * decides that it needs inexact rename detection. |
| 7498 | */ |
| 7499 | if (repo_has_promisor_remote(options->repo) && |
| 7500 | (options->output_format & output_formats_to_prefetch || |
| 7501 | options->pickaxe_opts & DIFF_PICKAXE_KINDS_MASK)) |
| 7502 | diff_queued_diff_prefetch(options->repo); |
| 7503 | |
| 7504 | /* NOTE please keep the following in sync with diff_tree_combined() */ |
| 7505 | if (options->skip_stat_unmatch) |
| 7506 | diffcore_skip_stat_unmatch(options); |
| 7507 | if (!options->found_follow) { |
| 7508 | /* See try_to_follow_renames() in tree-diff.c */ |
| 7509 | if (options->break_opt != -1) |
| 7510 | diffcore_break(options->repo, |
| 7511 | options->break_opt); |
| 7512 | if (options->detect_rename) |
| 7513 | diffcore_rename(options); |
| 7514 | if (options->break_opt != -1) |
| 7515 | diffcore_merge_broken(); |
| 7516 | } |
| 7517 | if (options->pickaxe_opts & DIFF_PICKAXE_KINDS_MASK) |
| 7518 | diffcore_pickaxe(options); |
| 7519 | if (options->orderfile) |
| 7520 | diffcore_order(options->orderfile); |
| 7521 | if (options->rotate_to) |
| 7522 | diffcore_rotate(options); |
| 7523 | if (!options->found_follow && !options->skip_resolving_statuses) |
| 7524 | /* See try_to_follow_renames() in tree-diff.c */ |
| 7525 | diff_resolve_rename_copy(); |
| 7526 | diffcore_apply_filter(options); |
| 7527 | |
| 7528 | if (diff_queued_diff.nr && !options->flags.diff_from_contents) |
| 7529 | options->flags.has_changes = 1; |
| 7530 | else |
| 7531 | options->flags.has_changes = 0; |
| 7532 | |
| 7533 | options->found_follow = 0; |
| 7534 | } |
| 7535 | |
| 7536 | int diff_result_code(struct rev_info *revs) |
| 7537 | { |
no test coverage detected