Skip to main content

install_added_worktree_files

Function install_added_worktree_files 

Source
pub fn install_added_worktree_files(
    context: &GitContext,
    cwd: &Path,
    repository_root: &Path,
    records: &[AddedPath],
    object_directory: Option<&Path>,
) -> Result<InstallResult, RecoveryError>
Expand description

What: Bring every added path’s worktree copy to its landed bytes. Why: installAddedWorktreeFiles: a copy already holding the landed bytes is left alone, which makes recovery idempotent; a changed copy is kept and reported.

In TS you’d write (pseudocode):

async function installAddedWorktreeFiles({ gitPath, cwd, repositoryRoot, records, objectDirectory }): Promise<AddedWorktreeInstallResult>;