Move write_info_refs to dulwich.refs.