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

Function diff_result_code

diff.c:7536–7557  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7534}
7535
7536int diff_result_code(struct rev_info *revs)
7537{
7538 struct diff_options *opt = &revs->diffopt;
7539 int result = 0;
7540
7541 if (revs->remerge_diff) {
7542 tmp_objdir_destroy(revs->remerge_objdir);
7543 revs->remerge_objdir = NULL;
7544 }
7545
7546 diff_warn_rename_limit("diff.renameLimit",
7547 opt->needed_rename_limit,
7548 opt->degraded_cc_to_c);
7549
7550 if (opt->flags.exit_with_status &&
7551 opt->flags.has_changes)
7552 result |= 01;
7553 if ((opt->output_format & DIFF_FORMAT_CHECKDIFF) &&
7554 opt->flags.check_failed)
7555 result |= 02;
7556 return result;
7557}
7558
7559int diff_can_quit_early(struct diff_options *opt)
7560{

Callers 13

has_unstaged_changesFunction · 0.85
has_uncommitted_changesFunction · 0.85
diff_no_indexFunction · 0.85
cmd_diff_indexFunction · 0.85
cmd_diff_filesFunction · 0.85
cmd_log_walk_no_freeFunction · 0.85
show_stashFunction · 0.85
cmd_describeFunction · 0.85
status_submoduleFunction · 0.85
cmd_diff_treeFunction · 0.85
cmd_diffFunction · 0.85

Calls 2

tmp_objdir_destroyFunction · 0.85
diff_warn_rename_limitFunction · 0.85

Tested by

no test coverage detected