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

Function refer_to_commit

sequencer.c:2214–2228  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2212}
2213
2214static void refer_to_commit(struct repository *r, struct strbuf *msgbuf,
2215 const struct commit *commit,
2216 bool use_commit_reference)
2217{
2218 if (use_commit_reference) {
2219 struct pretty_print_context ctx = {
2220 .abbrev = DEFAULT_ABBREV,
2221 .date_mode.type = DATE_SHORT,
2222 };
2223 repo_format_commit_message(r, commit,
2224 "%h (%s, %ad)", msgbuf, &ctx);
2225 } else {
2226 strbuf_add_oid_hex(msgbuf, &commit->object.oid);
2227 }
2228}
2229
2230static const char *sequencer_reflog_action(struct replay_opts *opts)
2231{

Callers 1

Calls 2

strbuf_add_oid_hexFunction · 0.85

Tested by

no test coverage detected