| 567 | } |
| 568 | |
| 569 | fn parse_git_remote_line(line: &str) -> Option<WorkspaceGitRemote> { |
| 570 | let mut parts = line.split_whitespace(); |
| 571 | let name = parts.next()?; |
| 572 | let url = parts.next()?; |
| 573 | let direction = parts |
| 574 | .next() |
| 575 | .unwrap_or_default() |
| 576 | .trim_start_matches('(') |
| 577 | .trim_end_matches(')'); |
| 578 | |
| 579 | Some(WorkspaceGitRemote { |
| 580 | name: name.to_string(), |
| 581 | url: url.to_string(), |
| 582 | direction: direction.to_string(), |
| 583 | }) |
| 584 | } |
| 585 | |
| 586 | fn default_local_worktree_path(root: &Path, branch: &str) -> PathBuf { |
| 587 | let repo_name = root |