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

Function format_trailers_from_commit

trailer.c:1199–1217  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1197}
1198
1199void format_trailers_from_commit(const struct process_trailer_options *opts,
1200 const char *msg,
1201 struct strbuf *out)
1202{
1203 LIST_HEAD(trailer_objects);
1204 struct trailer_block *trailer_block = parse_trailers(opts, msg, &trailer_objects);
1205
1206 /* If we want the whole block untouched, we can take the fast path. */
1207 if (!opts->only_trailers && !opts->unfold && !opts->filter &&
1208 !opts->separator && !opts->key_only && !opts->value_only &&
1209 !opts->key_value_separator) {
1210 strbuf_add(out, msg + trailer_block->start,
1211 trailer_block->end - trailer_block->start);
1212 } else
1213 format_trailers(opts, &trailer_objects, out);
1214
1215 free_trailers(&trailer_objects);
1216 trailer_block_release(trailer_block);
1217}
1218
1219void trailer_iterator_init(struct trailer_iterator *iter, const char *msg)
1220{

Callers 2

grab_sub_body_contentsFunction · 0.85
format_commit_oneFunction · 0.85

Calls 5

parse_trailersFunction · 0.85
strbuf_addFunction · 0.85
format_trailersFunction · 0.85
free_trailersFunction · 0.85
trailer_block_releaseFunction · 0.85

Tested by

no test coverage detected