| 197 | } |
| 198 | |
| 199 | static 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 |
no test coverage detected