(message: &str)
| 142 | } |
| 143 | |
| 144 | fn commit(message: &str) -> Result<()> { |
| 145 | let result = std::process::Command::new("git") |
| 146 | .args(["commit", "-m", message]) |
| 147 | .stdout(std::process::Stdio::inherit()) |
| 148 | .stderr(std::process::Stdio::inherit()) |
| 149 | .status() |
| 150 | .context("无法执行 git commit 命令")?; |
| 151 | anyhow::ensure!(result.success(), "git commit 命令执行失败"); |
| 152 | Ok(()) |
| 153 | } |
| 154 | |
| 155 | fn push(branch: &str) -> Result<()> { |
| 156 | let result = std::process::Command::new("git") |