The standalone git-receive-pack binary lives in libexec/git-core/, which
is not on PATH in the container. Using `git receive-pack` lets the git
binary handle the dispatch internally.
Assisted-by: GLM-5.1 via pi
ensure!(repo.exists(), "repository not found: {path}");
tracing::info!(%git_cmd, %path, "dispatching git command");
- let err = Command::new(git_cmd)
+ // Use `git <subcommand>` instead of `git-<subcommand>` so the git
+ // binary handles dispatch to libexec/git-core/ internally.
+ let subcommand = git_cmd
+ .strip_prefix("git-")
+ .ok_or_else(|| miette::miette!("unexpected git command: {git_cmd}"))?;
+ let err = Command::new("git")
+ .arg(subcommand)
.arg(".")
.current_dir(repo.path())
.exec();