| 599 | } |
| 600 | |
| 601 | void 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 | } |
no test coverage detected