(path: &Path)
| 242 | } |
| 243 | |
| 244 | pub fn get_status(path: &Path) -> Vec<String> { |
| 245 | let result = run(&["status", "--porcelain"], path); |
| 246 | if result.success() { |
| 247 | result.stdout.lines().map(|s| s.to_string()).collect() |
| 248 | } else { |
| 249 | Vec::new() |
| 250 | } |
| 251 | } |
| 252 | |
| 253 | pub fn has_uncommitted_changes(path: &Path) -> bool { |
| 254 | !get_status(path).is_empty() |
no test coverage detected