pub fn synchronize_created_worktree(
context: &GitContext,
common_dir: &Path,
source_root: &Path,
destination_root: &Path,
registered_roots: &[PathBuf],
selection: &CopySelection,
) -> Result<usize, WorktreeCopyError>Expand description
What: Stages, journals and installs the ignored state of one newly created worktree. Why: The stage is removed if the journal cannot be created, and a process that dies while staging leaves a claim, so no stage survives without a record that recovery can act on.
In TS you’d write (pseudocode):
async function synchronizeCreatedWorktree({ commonDir, sourceRoot, destinationRoot, registeredRoots, gitPath }): Promise<number>;