Resolve symlinks where possible so tmp/realpath quirks don't break equality checks. Falls back to a plain `absolutize` when canonicalize fails (e.g. directory was deleted between rev-parse and the fs call).
(p: &Path)
| 156 | /// equality checks. Falls back to a plain `absolutize` when canonicalize |
| 157 | /// fails (e.g. directory was deleted between rev-parse and the fs call). |
| 158 | fn realpath(p: &Path) -> Option<PathBuf> { |
| 159 | std::fs::canonicalize(p).ok() |
| 160 | } |
| 161 | |
| 162 | #[cfg(test)] |
| 163 | fn git_command() -> Command { |
no test coverage detected