git_workspace/commands/
fetch.rs

1use super::execute_cmd;
2use std::path::Path;
3
4/// Run `git fetch` on all our repositories
5pub fn fetch(workspace: &Path, threads: usize) -> anyhow::Result<()> {
6    let cmd = [
7        "fetch",
8        "--all",
9        "--prune",
10        "--recurse-submodules=on-demand",
11        "--progress",
12    ];
13    execute_cmd(
14        workspace,
15        threads,
16        "git".to_string(),
17        cmd.iter().map(|s| (*s).to_string()).collect(),
18    )?;
19    Ok(())
20}