* Write oid to the given struct child_process's stdin, starting it first if * necessary. */
| 17 | * necessary. |
| 18 | */ |
| 19 | static int write_oid(const struct object_id *oid, |
| 20 | struct object_info *oi UNUSED, |
| 21 | void *data) |
| 22 | { |
| 23 | struct write_oid_context *ctx = data; |
| 24 | struct child_process *cmd = ctx->cmd; |
| 25 | |
| 26 | if (cmd->in == -1) { |
| 27 | if (start_command(cmd)) |
| 28 | die(_("could not start pack-objects to repack promisor objects")); |
| 29 | } |
| 30 | |
| 31 | if (write_in_full(cmd->in, oid_to_hex(oid), ctx->algop->hexsz) < 0 || |
| 32 | write_in_full(cmd->in, "\n", 1) < 0) |
| 33 | die(_("failed to feed promisor objects to pack-objects")); |
| 34 | return 0; |
| 35 | } |
| 36 | |
| 37 | static void finish_repacking_promisor_objects(struct repository *repo, |
| 38 | struct child_process *cmd, |
nothing calls this directly
no test coverage detected