feat: improve git error messages

This commit is contained in:
Jacobtread 2025-08-10 22:29:45 +12:00
parent 4e97968bcb
commit ff54882d61

View file

@ -1816,6 +1816,7 @@ impl GitBinary {
output.status.success(),
GitBinaryCommandError {
stdout: String::from_utf8_lossy(&output.stdout).to_string(),
stderr: String::from_utf8_lossy(&output.stderr).to_string(),
status: output.status,
}
);
@ -1838,9 +1839,10 @@ impl GitBinary {
}
#[derive(Error, Debug)]
#[error("Git command failed: {stdout}")]
#[error("Git command failed: {stdout} {stderr}")]
struct GitBinaryCommandError {
stdout: String,
stderr: String,
status: ExitStatus,
}