sha1_file: convert assert_sha1_type to object_id