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

Function log_commit

builtin/bisect.c:273–289  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

271}
272
273static void log_commit(FILE *fp,
274 const char *fmt, const char *state,
275 struct commit *commit)
276{
277 struct pretty_print_context pp = {0};
278 struct strbuf commit_msg = STRBUF_INIT;
279 char *label = xstrfmt(fmt, state);
280
281 repo_format_commit_message(the_repository, commit, "%s", &commit_msg,
282 &pp);
283
284 fprintf(fp, "# %s: [%s] %s\n", label, oid_to_hex(&commit->object.oid),
285 commit_msg.buf);
286
287 strbuf_release(&commit_msg);
288 free(label);
289}
290
291static int bisect_write(const char *state, const char *rev,
292 const struct bisect_terms *terms, int nolog)

Callers 1

bisect_writeFunction · 0.85

Calls 4

xstrfmtFunction · 0.85
oid_to_hexFunction · 0.85
strbuf_releaseFunction · 0.85

Tested by

no test coverage detected