Skip to main content

assert_private_path

Function assert_private_path 

Source
pub fn assert_private_path(
    path: &Path,
    role: Role,
) -> Result<(), WorktreeCopyError>
Expand description

What: Checks that a path is canonical, owned by this account, private, and of the role’s kind. Why: A journal or stage that another account can write, or that a link redirects, is never acted on.

In TS you’d write (pseudocode):

await assertPrivateWorktreeCopyPath({ path, role });