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

Function show_mode_change

diff.c:6769–6785  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6767}
6768
6769static void show_mode_change(struct diff_options *opt, struct diff_filepair *p,
6770 int show_name)
6771{
6772 if (p->one->mode && p->two->mode && p->one->mode != p->two->mode) {
6773 struct strbuf sb = STRBUF_INIT;
6774 strbuf_addf(&sb, " mode change %06o => %06o",
6775 p->one->mode, p->two->mode);
6776 if (show_name) {
6777 strbuf_addch(&sb, ' ');
6778 quote_c_style(p->two->path, &sb, NULL, 0);
6779 }
6780 strbuf_addch(&sb, '\n');
6781 emit_diff_symbol(opt, DIFF_SYMBOL_SUMMARY,
6782 sb.buf, sb.len, 0);
6783 strbuf_release(&sb);
6784 }
6785}
6786
6787static void show_rename_copy(struct diff_options *opt, const char *renamecopy,
6788 struct diff_filepair *p)

Callers 2

show_rename_copyFunction · 0.70
diff_summaryFunction · 0.70

Calls 5

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

Tested by

no test coverage detected