pub fn print_status_to( writer: &mut impl Write, repo_path: &Path, scope: Option<&str>, ) -> Result<(), String>
写入指定 writer 的版本(可测试)。