(common_dir: &Path)
| 153 | } |
| 154 | |
| 155 | fn main_worktree_root(common_dir: &Path) -> PathBuf { |
| 156 | match (common_dir.file_name(), common_dir.parent()) { |
| 157 | (Some(name), Some(parent)) if name == GIT_DIR_NAME => parent.to_path_buf(), |
| 158 | _ => common_dir.to_path_buf(), |
| 159 | } |
| 160 | } |
| 161 | |
| 162 | fn canonical_or_raw(path: &Path) -> PathBuf { |
| 163 | fs::canonicalize(path).unwrap_or_else(|_| path.to_path_buf()) |
no test coverage detected