| 483 | } |
| 484 | |
| 485 | static int get_message(struct commit *commit, struct commit_message *out) |
| 486 | { |
| 487 | const char *abbrev, *subject; |
| 488 | int subject_len; |
| 489 | |
| 490 | out->message = repo_logmsg_reencode(the_repository, commit, NULL, |
| 491 | get_commit_output_encoding()); |
| 492 | abbrev = short_commit_name(the_repository, commit); |
| 493 | |
| 494 | subject_len = find_commit_subject(out->message, &subject); |
| 495 | |
| 496 | out->subject = xmemdupz(subject, subject_len); |
| 497 | out->label = xstrfmt("%s (%s)", abbrev, out->subject); |
| 498 | out->parent_label = xstrfmt("parent of %s", out->label); |
| 499 | |
| 500 | return 0; |
| 501 | } |
| 502 | |
| 503 | static void free_message(struct commit *commit, struct commit_message *msg) |
| 504 | { |
no test coverage detected