| 871 | static int check_ref(const struct reference *ref, void *cb_data); |
| 872 | |
| 873 | static void deepen(struct upload_pack_data *data, int depth) |
| 874 | { |
| 875 | if (depth == INFINITE_DEPTH && !is_repository_shallow(the_repository)) { |
| 876 | int i; |
| 877 | |
| 878 | for (i = 0; i < data->shallows.nr; i++) { |
| 879 | struct object *object = data->shallows.objects[i].item; |
| 880 | object->flags |= NOT_SHALLOW; |
| 881 | } |
| 882 | } else { |
| 883 | struct commit_list *result; |
| 884 | |
| 885 | result = get_shallow_commits(&data->want_obj, &data->shallows, |
| 886 | data->deepen_relative, depth, |
| 887 | SHALLOW, NOT_SHALLOW); |
| 888 | send_shallow(data, result); |
| 889 | commit_list_free(result); |
| 890 | } |
| 891 | |
| 892 | send_unshallow(data); |
| 893 | } |
| 894 | |
| 895 | static void deepen_by_rev_list(struct upload_pack_data *data, |
| 896 | struct strvec *argv) |
no test coverage detected