pub fn is_scratch_path(path: &Path, git_dir: &Path) -> boolExpand description
What:
Whether path is the scratch directory of a commit in the worktree whose own Git directory is git_dir.
Why:
The service removes whatever a client names when the client’s connection closes, so the name must be one only the
wrapper makes (the prefix and an identity of letters, digits and dashes) and the place must be directly inside the
worktree’s own Git directory, with no relative part that could lead elsewhere.
In TS you’d write (pseudocode):
isScratchPath(path, gitDir)