| 486 | } |
| 487 | |
| 488 | static int get_terms(struct bisect_terms *terms) |
| 489 | { |
| 490 | struct strbuf str = STRBUF_INIT; |
| 491 | FILE *fp = NULL; |
| 492 | int res = 0; |
| 493 | |
| 494 | fp = fopen(git_path_bisect_terms(), "r"); |
| 495 | if (!fp) { |
| 496 | res = -1; |
| 497 | goto finish; |
| 498 | } |
| 499 | |
| 500 | free_terms(terms); |
| 501 | strbuf_getline_lf(&str, fp); |
| 502 | terms->term_bad = strbuf_detach(&str, NULL); |
| 503 | strbuf_getline_lf(&str, fp); |
| 504 | terms->term_good = strbuf_detach(&str, NULL); |
| 505 | |
| 506 | finish: |
| 507 | if (fp) |
| 508 | fclose(fp); |
| 509 | strbuf_release(&str); |
| 510 | return res; |
| 511 | } |
| 512 | |
| 513 | static int bisect_terms(struct bisect_terms *terms, const char *option) |
| 514 | { |
no test coverage detected