| 449 | }; |
| 450 | |
| 451 | static void write_bundle_prerequisites(struct commit *commit, void *data) |
| 452 | { |
| 453 | struct bundle_prerequisites_info *bpi = data; |
| 454 | struct object *object; |
| 455 | struct pretty_print_context ctx = { 0 }; |
| 456 | struct strbuf buf = STRBUF_INIT; |
| 457 | |
| 458 | if (!(commit->object.flags & BOUNDARY)) |
| 459 | return; |
| 460 | strbuf_addf(&buf, "-%s ", oid_to_hex(&commit->object.oid)); |
| 461 | write_or_die(bpi->fd, buf.buf, buf.len); |
| 462 | |
| 463 | ctx.fmt = CMIT_FMT_ONELINE; |
| 464 | ctx.output_encoding = get_log_output_encoding(); |
| 465 | strbuf_reset(&buf); |
| 466 | pretty_print_commit(&ctx, commit, &buf); |
| 467 | strbuf_trim(&buf); |
| 468 | |
| 469 | object = (struct object *)commit; |
| 470 | object->flags |= UNINTERESTING; |
| 471 | add_object_array_with_path(object, buf.buf, bpi->pending, S_IFINVALID, |
| 472 | NULL); |
| 473 | strbuf_addch(&buf, '\n'); |
| 474 | write_or_die(bpi->fd, buf.buf, buf.len); |
| 475 | strbuf_release(&buf); |
| 476 | } |
| 477 | |
| 478 | int create_bundle(struct repository *r, const char *path, |
| 479 | int argc, const char **argv, struct strvec *pack_options, int version) |
nothing calls this directly
no test coverage detected