| 653 | } |
| 654 | |
| 655 | static int bisect_successful(struct bisect_terms *terms) |
| 656 | { |
| 657 | struct object_id oid; |
| 658 | struct commit *commit; |
| 659 | struct pretty_print_context pp = {0}; |
| 660 | struct strbuf commit_name = STRBUF_INIT; |
| 661 | char *bad_ref = xstrfmt("refs/bisect/%s",terms->term_bad); |
| 662 | int res; |
| 663 | |
| 664 | refs_read_ref(get_main_ref_store(the_repository), bad_ref, &oid); |
| 665 | commit = lookup_commit_reference_by_name(bad_ref); |
| 666 | repo_format_commit_message(the_repository, commit, "%s", &commit_name, |
| 667 | &pp); |
| 668 | |
| 669 | res = append_to_file(git_path_bisect_log(), "# first '%s' commit: [%s] %s\n", |
| 670 | terms->term_bad, oid_to_hex(&commit->object.oid), |
| 671 | commit_name.buf); |
| 672 | |
| 673 | strbuf_release(&commit_name); |
| 674 | free(bad_ref); |
| 675 | return res; |
| 676 | } |
| 677 | |
| 678 | static enum bisect_error bisect_next(struct bisect_terms *terms, const char *prefix) |
| 679 | { |
no test coverage detected