(db: &GlobalDb, selector: &str)
| 58 | } |
| 59 | |
| 60 | async fn project_context(db: &GlobalDb, selector: &str) -> Option<ProjectRegistryContext> { |
| 61 | if let Some(context) = db.project_registry_context_by_id(selector).await { |
| 62 | return Some(context); |
| 63 | } |
| 64 | let selector_path = Path::new(selector); |
| 65 | if let Some(context) = db.project_registry_context_by_alias(selector_path).await { |
| 66 | return Some(context); |
| 67 | } |
| 68 | if !GlobalDb::is_explicit_project_path_selector(selector) { |
| 69 | return None; |
| 70 | } |
| 71 | let git_common_dir = tracedecay::worktree::git_common_dir(selector_path); |
| 72 | db.project_registry_context_by_identity(selector_path, git_common_dir.as_deref()) |
| 73 | .await |
| 74 | } |
| 75 | |
| 76 | fn print_projects( |
| 77 | label: &str, |
no test coverage detected