MCPcopy Index your code
hub / github.com/AI45Lab/Code / parse_git_remote_line

Function parse_git_remote_line

core/src/workspace/local.rs:569–584  ·  view source on GitHub ↗
(line: &str)

Source from the content-addressed store, hash-verified

567}
568
569fn 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
586fn default_local_worktree_path(root: &Path, branch: &str) -> PathBuf {
587 let repo_name = root

Callers

nothing calls this directly

Calls 1

nextMethod · 0.45

Tested by

no test coverage detected