| 835 | } |
| 836 | |
| 837 | static void send_unshallow(struct upload_pack_data *data) |
| 838 | { |
| 839 | int i; |
| 840 | |
| 841 | for (i = 0; i < data->shallows.nr; i++) { |
| 842 | struct object *object = data->shallows.objects[i].item; |
| 843 | if (object->flags & NOT_SHALLOW) { |
| 844 | struct commit_list *parents; |
| 845 | packet_writer_write(&data->writer, "unshallow %s", |
| 846 | oid_to_hex(&object->oid)); |
| 847 | object->flags &= ~CLIENT_SHALLOW; |
| 848 | /* |
| 849 | * We want to _register_ "object" as shallow, but we |
| 850 | * also need to traverse object's parents to deepen a |
| 851 | * shallow clone. Unregister it for now so we can |
| 852 | * parse and add the parents to the want list, then |
| 853 | * re-register it. |
| 854 | */ |
| 855 | unregister_shallow(&object->oid); |
| 856 | object->parsed = 0; |
| 857 | parse_commit_or_die((struct commit *)object); |
| 858 | parents = ((struct commit *)object)->parents; |
| 859 | while (parents) { |
| 860 | add_object_array(&parents->item->object, |
| 861 | NULL, &data->want_obj); |
| 862 | parents = parents->next; |
| 863 | } |
| 864 | add_object_array(object, NULL, &data->extra_edge_obj); |
| 865 | } |
| 866 | /* make sure commit traversal conforms to client */ |
| 867 | register_shallow(the_repository, &object->oid); |
| 868 | } |
| 869 | } |
| 870 | |
| 871 | static int check_ref(const struct reference *ref, void *cb_data); |
| 872 |
no test coverage detected