MCPcopy Index your code
hub / github.com/git/git / diffcore_std

Function diffcore_std

diff.c:7483–7534  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7481}
7482
7483void 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
7536int diff_result_code(struct rev_info *revs)
7537{

Callers 15

queue_diffsFunction · 0.85
try_to_follow_renamesFunction · 0.85
find_originFunction · 0.85
find_renameFunction · 0.85
find_copy_in_parentFunction · 0.85
patch_diffFunction · 0.85
find_paths_genericFunction · 0.85
diff_tree_combinedFunction · 0.85
log_tree_diff_flushFunction · 0.85
diff_no_indexFunction · 0.85
commit_patch_idFunction · 0.85

Calls 11

repo_has_promisor_remoteFunction · 0.85
diffcore_breakFunction · 0.85
diffcore_renameFunction · 0.85
diffcore_merge_brokenFunction · 0.85
diffcore_pickaxeFunction · 0.85
diffcore_orderFunction · 0.85
diffcore_rotateFunction · 0.85
diff_resolve_rename_copyFunction · 0.85
diffcore_apply_filterFunction · 0.85

Tested by

no test coverage detected