126
127
128
129
130
131
132
133
134
135
136
pub fn git_files(opt: &Opt) -> Result<Vec<String>, Error> {
let list = CmdGit::get_files(&opt)?;
let mut files = vec![String::from(""); opt.thread];
for (i, f) in list.iter().enumerate() {
files[i % opt.thread].push_str(f);
files[i % opt.thread].push_str("\n");
}
Ok(files)
}