| 951 | } |
| 952 | |
| 953 | static int process_shallow(const char *line, struct object_array *shallows) |
| 954 | { |
| 955 | const char *arg; |
| 956 | if (skip_prefix(line, "shallow ", &arg)) { |
| 957 | struct object_id oid; |
| 958 | struct object *object; |
| 959 | if (get_oid_hex(arg, &oid)) |
| 960 | die("invalid shallow line: %s", line); |
| 961 | object = parse_object(the_repository, &oid); |
| 962 | if (!object) |
| 963 | return 1; |
| 964 | if (object->type != OBJ_COMMIT) |
| 965 | die("invalid shallow object %s", oid_to_hex(&oid)); |
| 966 | if (!(object->flags & CLIENT_SHALLOW)) { |
| 967 | object->flags |= CLIENT_SHALLOW; |
| 968 | add_object_array(object, NULL, shallows); |
| 969 | } |
| 970 | return 1; |
| 971 | } |
| 972 | |
| 973 | return 0; |
| 974 | } |
| 975 | |
| 976 | static int process_deepen(const char *line, int *depth) |
| 977 | { |
no test coverage detected