| 386 | } |
| 387 | |
| 388 | static int write_shallow_commits_1(struct strbuf *out, int use_pack_protocol, |
| 389 | const struct oid_array *extra, |
| 390 | unsigned flags) |
| 391 | { |
| 392 | struct write_shallow_data data = { |
| 393 | .out = out, |
| 394 | .use_pack_protocol = use_pack_protocol, |
| 395 | .flags = flags, |
| 396 | }; |
| 397 | |
| 398 | for_each_commit_graft(write_one_shallow, &data); |
| 399 | if (!extra) |
| 400 | return data.count; |
| 401 | for (size_t i = 0; i < extra->nr; i++) { |
| 402 | strbuf_add_oid_hex(out, extra->oid + i); |
| 403 | strbuf_addch(out, '\n'); |
| 404 | data.count++; |
| 405 | } |
| 406 | return data.count; |
| 407 | } |
| 408 | |
| 409 | int write_shallow_commits(struct strbuf *out, int use_pack_protocol, |
| 410 | const struct oid_array *extra) |
no test coverage detected