pub fn replace_worktree_file(
destination: &Path,
bytes: &[u8],
git_mode: &str,
original: &[u8],
identity: &WorktreeFileIdentity,
) -> Result<bool, RecoveryError>Expand description
What:
Replace one unchanged worktree file through a same-directory temporary file;
returns
whether it was installed without an observed conflict.
Why:
replaceWorktreeFile:
the destination is checked again after the replacement is ready.
In TS you’d write (pseudocode):
async function replaceWorktreeFile({ destination, bytes, mode, gitMode, original, identity }): Promise<boolean>;