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

Function get_commit_info

builtin/blame.c:199–222  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

197}
198
199static void get_commit_info(struct commit *commit, struct commit_info *ret)
200{
201 int len;
202 const char *subject, *encoding;
203 const char *message;
204
205 encoding = get_log_output_encoding();
206 message = repo_logmsg_reencode(the_repository, commit, NULL, encoding);
207 get_ac_line(message, "\nauthor ",
208 &ret->author, &ret->author_mail,
209 &ret->author_time, &ret->author_tz);
210
211 get_ac_line(message, "\ncommitter ",
212 &ret->committer, &ret->committer_mail,
213 &ret->committer_time, &ret->committer_tz);
214
215 len = find_commit_subject(message, &subject);
216 if (len)
217 strbuf_add(&ret->summary, subject, len);
218 else
219 strbuf_addf(&ret->summary, "(%s)", oid_to_hex(&commit->object.oid));
220
221 repo_unuse_commit_buffer(the_repository, commit, message);
222}
223
224/*
225 * Write out any suspect information which depends on the path. This must be

Callers 3

emit_one_suspect_detailFunction · 0.70
emit_otherFunction · 0.70
find_alignmentFunction · 0.70

Calls 8

get_log_output_encodingFunction · 0.85
repo_logmsg_reencodeFunction · 0.85
get_ac_lineFunction · 0.85
find_commit_subjectFunction · 0.85
strbuf_addFunction · 0.85
strbuf_addfFunction · 0.85
oid_to_hexFunction · 0.85
repo_unuse_commit_bufferFunction · 0.85

Tested by

no test coverage detected