Run `git clone ` with inherited stdio (the user's auth config, agents, and askpass prompts behave exactly like plain Git).
(url: &str, target: &Path)
| 87 | /// Run `git clone <url> <path>` with inherited stdio (the user's auth |
| 88 | /// config, agents, and askpass prompts behave exactly like plain Git). |
| 89 | pub(crate) fn git_clone(url: &str, target: &Path) -> CliResult<()> { |
| 90 | let status = Command::new("git") |
| 91 | .args(["clone", url]) |
| 92 | .arg(target) |
| 93 | .status() |
| 94 | .map_err(|error| CliError::GitError { |
| 95 | message: format!("cannot run git clone: {error}"), |
| 96 | })?; |
| 97 | if !status.success() { |
| 98 | return Err(CliError::GitError { |
| 99 | message: format!("git clone of '{url}' exited with {status}"), |
| 100 | }); |
| 101 | } |
| 102 | Ok(()) |
| 103 | } |
| 104 | |
| 105 | /// Fetch the RFC §8.6 binding/view namespaces from `remote` after the |
| 106 | /// refspecs are configured. Plain `git clone` transfers only |
no test coverage detected