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

Function print_submodule_diff_summary

submodule.c:473–493  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

471}
472
473static void print_submodule_diff_summary(struct repository *r, struct rev_info *rev, struct diff_options *o)
474{
475 static const char format[] = " %m %s";
476 struct strbuf sb = STRBUF_INIT;
477 struct commit *commit;
478
479 while ((commit = get_revision(rev))) {
480 struct pretty_print_context ctx = {0};
481 ctx.date_mode = rev->date_mode;
482 ctx.output_encoding = get_log_output_encoding();
483 strbuf_setlen(&sb, 0);
484 repo_format_commit_message(r, commit, format, &sb,
485 &ctx);
486 strbuf_addch(&sb, '\n');
487 if (commit->object.flags & SYMMETRIC_LEFT)
488 diff_emit_submodule_del(o, sb.buf);
489 else
490 diff_emit_submodule_add(o, sb.buf);
491 }
492 strbuf_release(&sb);
493}
494
495void prepare_submodule_repo_env(struct strvec *out)
496{

Callers 1

Calls 8

get_revisionFunction · 0.85
get_log_output_encodingFunction · 0.85
strbuf_setlenFunction · 0.85
strbuf_addchFunction · 0.85
diff_emit_submodule_delFunction · 0.85
diff_emit_submodule_addFunction · 0.85
strbuf_releaseFunction · 0.85

Tested by

no test coverage detected