(path: &Path)
| 233 | } |
| 234 | |
| 235 | pub fn get_head_commit(path: &Path) -> Option<String> { |
| 236 | let result = run(&["rev-parse", "HEAD"], path); |
| 237 | if result.success() { |
| 238 | Some(result.stdout.trim().to_string()) |
| 239 | } else { |
| 240 | None |
| 241 | } |
| 242 | } |
| 243 | |
| 244 | pub fn get_status(path: &Path) -> Vec<String> { |
| 245 | let result = run(&["status", "--porcelain"], path); |