Refactor _vcs_info_prompt function.