Merge branch 'nd/upload-pack-shallow-must-be-commit'
A minor consistency check patch that does not have much relevance to the real world. * nd/upload-pack-shallow-must-be-commit: upload-pack: only accept commits from "shallow" line
This commit is contained in:
commit
e43171a4a7
@ -603,6 +603,8 @@ static void receive_needs(void)
|
||||
object = parse_object(sha1);
|
||||
if (!object)
|
||||
die("did not find object for %s", line);
|
||||
if (object->type != OBJ_COMMIT)
|
||||
die("invalid shallow object %s", sha1_to_hex(sha1));
|
||||
object->flags |= CLIENT_SHALLOW;
|
||||
add_object_array(object, NULL, &shallows);
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user