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

Function format_commit

merge-ort.c:771–789  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

769}
770
771static void format_commit(struct strbuf *sb,
772 int indent,
773 struct repository *repo,
774 struct commit *commit)
775{
776 struct merge_remote_desc *desc;
777 struct pretty_print_context ctx = {0};
778 ctx.abbrev = DEFAULT_ABBREV;
779
780 strbuf_addchars(sb, ' ', indent);
781 desc = merge_remote_util(commit);
782 if (desc) {
783 strbuf_addf(sb, "virtual %s\n", desc->name);
784 return;
785 }
786
787 repo_format_commit_message(repo, commit, "%h %s", sb, &ctx);
788 strbuf_addch(sb, '\n');
789}
790
791__attribute__((format (printf, 8, 9)))
792static void path_msg(struct merge_options *opt,

Callers 1

merge_submoduleFunction · 0.85

Calls 5

strbuf_addcharsFunction · 0.85
merge_remote_utilFunction · 0.85
strbuf_addfFunction · 0.85
strbuf_addchFunction · 0.85

Tested by

no test coverage detected