Skip to main content

worktree_refusal

Function worktree_refusal 

Source
pub fn worktree_refusal(
    file: &Path,
    mode: CandidateMode,
    head_bytes: &[u8],
) -> Result<Option<&'static str>, Error>
Expand description

What: Why the worktree copy rules out the file, if it does. Err is a read the system refused for another reason than the file being absent. Why: The copy must be a plain file, not a link, with HEAD’s executable bit and bytes.

In TS you’d write (pseudocode):

async function worktreeRefusal(file: string, mode, headBytes): Promise<string | undefined>;