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

Function show_file_mode_name

diff.c:6754–6767  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6752}
6753
6754static void show_file_mode_name(struct diff_options *opt, const char *newdelete, struct diff_filespec *fs)
6755{
6756 struct strbuf sb = STRBUF_INIT;
6757 if (fs->mode)
6758 strbuf_addf(&sb, " %s mode %06o ", newdelete, fs->mode);
6759 else
6760 strbuf_addf(&sb, " %s ", newdelete);
6761
6762 quote_c_style(fs->path, &sb, NULL, 0);
6763 strbuf_addch(&sb, '\n');
6764 emit_diff_symbol(opt, DIFF_SYMBOL_SUMMARY,
6765 sb.buf, sb.len, 0);
6766 strbuf_release(&sb);
6767}
6768
6769static void show_mode_change(struct diff_options *opt, struct diff_filepair *p,
6770 int show_name)

Callers 1

diff_summaryFunction · 0.70

Calls 5

strbuf_addfFunction · 0.85
quote_c_styleFunction · 0.85
strbuf_addchFunction · 0.85
emit_diff_symbolFunction · 0.85
strbuf_releaseFunction · 0.85

Tested by

no test coverage detected