MCPcopy Index your code
hub / github.com/git/git / write_promisor_file

Function write_promisor_file

pack-write.c:601–614  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

599}
600
601void write_promisor_file(const char *promisor_name, struct ref **sought, int nr_sought)
602{
603 int i, err;
604 FILE *output = xfopen(promisor_name, "w");
605
606 for (i = 0; i < nr_sought; i++)
607 fprintf(output, "%s %s\n", oid_to_hex(&sought[i]->old_oid),
608 sought[i]->name);
609
610 err = ferror(output);
611 err |= fclose(output);
612 if (err)
613 die(_("could not write '%s' promisor file"), promisor_name);
614}

Callers 2

create_promisor_fileFunction · 0.85

Calls 3

xfopenFunction · 0.85
oid_to_hexFunction · 0.85
dieFunction · 0.70

Tested by

no test coverage detected