packfile: add repository argument to packed_to_object_type