MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / realpath

Function realpath

src/worktree.rs:158–160  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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).
158fn realpath(p: &Path) -> Option<PathBuf> {
159 std::fs::canonicalize(p).ok()
160}
161
162#[cfg(test)]
163fn git_command() -> Command {

Callers 2

git_worktree_rootFunction · 0.85

Calls 1

canonicalizeFunction · 0.85

Tested by

no test coverage detected