| 32 | } |
| 33 | |
| 34 | int register_shallow(struct repository *r, const struct object_id *oid) |
| 35 | { |
| 36 | struct commit_graft *graft = |
| 37 | xmalloc(sizeof(struct commit_graft)); |
| 38 | struct commit *commit = lookup_commit(r, oid); |
| 39 | |
| 40 | oidcpy(&graft->oid, oid); |
| 41 | graft->nr_parent = -1; |
| 42 | if (commit && commit->object.parsed) { |
| 43 | commit_list_free(commit->parents); |
| 44 | commit->parents = NULL; |
| 45 | } |
| 46 | return register_commit_graft(r, graft, 0); |
| 47 | } |
| 48 | |
| 49 | int unregister_shallow(const struct object_id *oid) |
| 50 | { |
no test coverage detected