MCPcopy Index your code
hub / github.com/git/git / process_shallow

Function process_shallow

upload-pack.c:953–974  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

951}
952
953static 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
976static int process_deepen(const char *line, int *depth)
977{

Callers 2

receive_needsFunction · 0.70
process_argsFunction · 0.70

Calls 5

get_oid_hexFunction · 0.85
parse_objectFunction · 0.85
oid_to_hexFunction · 0.85
add_object_arrayFunction · 0.85
dieFunction · 0.70

Tested by

no test coverage detected