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

Function get_terms

builtin/bisect.c:488–511  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

486}
487
488static 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
506finish:
507 if (fp)
508 fclose(fp);
509 strbuf_release(&str);
510 return res;
511}
512
513static int bisect_terms(struct bisect_terms *terms, const char *option)
514{

Callers 7

bisect_termsFunction · 0.85
process_replay_lineFunction · 0.85
cmd_bisect__nextFunction · 0.85
cmd_bisect__skipFunction · 0.85
cmd_bisect__visualizeFunction · 0.85
cmd_bisect__runFunction · 0.85
cmd_bisectFunction · 0.85

Calls 4

free_termsFunction · 0.85
strbuf_getline_lfFunction · 0.85
strbuf_detachFunction · 0.85
strbuf_releaseFunction · 0.85

Tested by

no test coverage detected