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

Function write_oid

repack-promisor.c:19–35  ·  view source on GitHub ↗

* Write oid to the given struct child_process's stdin, starting it first if * necessary. */

Source from the content-addressed store, hash-verified

17 * necessary.
18 */
19static 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
37static void finish_repacking_promisor_objects(struct repository *repo,
38 struct child_process *cmd,

Callers

nothing calls this directly

Calls 4

start_commandFunction · 0.85
write_in_fullFunction · 0.85
oid_to_hexFunction · 0.85
dieFunction · 0.70

Tested by

no test coverage detected