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

Function show_range_diff

range-diff.c:585–614  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

583}
584
585int show_range_diff(const char *range1, const char *range2,
586 struct range_diff_options *range_diff_opts)
587{
588 int res = 0;
589
590 struct string_list branch1 = STRING_LIST_INIT_DUP;
591 struct string_list branch2 = STRING_LIST_INIT_DUP;
592 unsigned int include_merges = range_diff_opts->include_merges;
593
594 if (range_diff_opts->left_only && range_diff_opts->right_only)
595 res = error(_("options '%s' and '%s' cannot be used together"), "--left-only", "--right-only");
596
597 if (!res && read_patches(range1, &branch1, range_diff_opts->log_arg, include_merges))
598 res = error(_("could not parse log for '%s'"), range1);
599 if (!res && read_patches(range2, &branch2, range_diff_opts->log_arg, include_merges))
600 res = error(_("could not parse log for '%s'"), range2);
601
602 if (!res) {
603 find_exact_matches(&branch1, &branch2);
604 get_correspondences(&branch1, &branch2,
605 range_diff_opts->creation_factor,
606 range_diff_opts->max_memory);
607 output(&branch1, &branch2, range_diff_opts);
608 }
609
610 string_list_clear(&branch1, 1);
611 string_list_clear(&branch2, 1);
612
613 return res;
614}
615
616int is_range_diff_range(const char *arg)
617{

Callers 3

show_diff_of_diffFunction · 0.85
make_cover_letterFunction · 0.85
cmd_range_diffFunction · 0.85

Calls 6

errorFunction · 0.85
read_patchesFunction · 0.85
find_exact_matchesFunction · 0.85
get_correspondencesFunction · 0.85
string_list_clearFunction · 0.85
outputFunction · 0.70

Tested by

no test coverage detected