MCPcopy Create free account
hub / github.com/git/git / flush_one_pair

Function flush_one_pair

diff.c:6734–6752  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6732}
6733
6734static void flush_one_pair(struct diff_filepair *p, struct diff_options *opt)
6735{
6736 int fmt = opt->output_format;
6737
6738 if (fmt & DIFF_FORMAT_CHECKDIFF)
6739 diff_flush_checkdiff(p, opt);
6740 else if (fmt & (DIFF_FORMAT_RAW | DIFF_FORMAT_NAME_STATUS))
6741 diff_flush_raw(p, opt);
6742 else if (fmt & DIFF_FORMAT_NAME) {
6743 const char *name_a, *name_b;
6744 name_a = p->two->path;
6745 name_b = NULL;
6746 strip_prefix(opt->prefix_length, &name_a, &name_b);
6747 fprintf(opt->file, "%s", diff_line_prefix(opt));
6748 write_name_quoted(name_a, opt->file, opt->line_termination);
6749 }
6750
6751 opt->found_changes = 1;
6752}
6753
6754static void show_file_mode_name(struct diff_options *opt, const char *newdelete, struct diff_filespec *fs)
6755{

Callers 1

diff_flushFunction · 0.85

Calls 5

diff_flush_checkdiffFunction · 0.85
diff_flush_rawFunction · 0.85
strip_prefixFunction · 0.85
diff_line_prefixFunction · 0.85
write_name_quotedFunction · 0.85

Tested by

no test coverage detected