| 47 | } |
| 48 | |
| 49 | int unregister_shallow(const struct object_id *oid) |
| 50 | { |
| 51 | int pos = commit_graft_pos(the_repository, oid); |
| 52 | if (pos < 0) |
| 53 | return -1; |
| 54 | free(the_repository->parsed_objects->grafts[pos]); |
| 55 | if (pos + 1 < the_repository->parsed_objects->grafts_nr) |
| 56 | MOVE_ARRAY(the_repository->parsed_objects->grafts + pos, |
| 57 | the_repository->parsed_objects->grafts + pos + 1, |
| 58 | the_repository->parsed_objects->grafts_nr - pos - 1); |
| 59 | the_repository->parsed_objects->grafts_nr--; |
| 60 | return 0; |
| 61 | } |
| 62 | |
| 63 | int is_repository_shallow(struct repository *r) |
| 64 | { |
no test coverage detected