(commit_message: &str)
| 122 | } |
| 123 | |
| 124 | fn commit_to_git(commit_message: &str) -> Result<()> { |
| 125 | let status = Command::new("git") |
| 126 | .arg("commit") |
| 127 | .arg("-m") |
| 128 | .arg(commit_message) |
| 129 | .status() |
| 130 | .map_err(OjoError::GitIo)?; |
| 131 | |
| 132 | if status.success() { |
| 133 | Ok(()) |
| 134 | } else { |
| 135 | Err(OjoError::GitFailure) |
| 136 | } |
| 137 | } |