replace struct repo_writer with repo_writer_t