(path: &Path)
| 215 | } |
| 216 | |
| 217 | pub fn get_current_branch(path: &Path) -> Option<String> { |
| 218 | let result = run(&["branch", "--show-current"], path); |
| 219 | if result.success() { |
| 220 | Some(result.stdout.trim().to_string()) |
| 221 | } else { |
| 222 | None |
| 223 | } |
| 224 | } |
| 225 | |
| 226 | pub fn get_remote_url(path: &Path) -> Option<String> { |
| 227 | let result = run(&["remote", "get-url", "origin"], path); |