(path: &Path)
| 224 | } |
| 225 | |
| 226 | pub fn get_remote_url(path: &Path) -> Option<String> { |
| 227 | let result = run(&["remote", "get-url", "origin"], path); |
| 228 | if result.success() { |
| 229 | Some(result.stdout.trim().to_string()) |
| 230 | } else { |
| 231 | None |
| 232 | } |
| 233 | } |
| 234 | |
| 235 | pub fn get_head_commit(path: &Path) -> Option<String> { |
| 236 | let result = run(&["rev-parse", "HEAD"], path); |