pub async fn run_heavy(
git_dir: &Path,
args: &[&str],
cap: usize,
) -> Result<GitOut, ForgeError>Expand description
run for operations that can burn real CPU or memory (search, archive):
at most four run at once process-wide, and a request that
cannot get a permit within a few seconds is ForgeError::Busy (503).
§Examples
use solid_pod_rs_forge::gitrun::run_heavy;
let out = run_heavy(repo, &["grep", "-F", "-i", "-e", "needle", "HEAD"], 1 << 20).await?;
// `git grep` exits 1 when nothing matches; that is not an error.
assert!(out.code == Some(0) || out.code == Some(1));§Errors
As run, plus ForgeError::Busy.