Skip to main content

Module worktree_ladder

Module worktree_ladder 

Source
Expand description

The cheap-worktree ladder around one git worktree add: what runs before real Git and after it. What: The cheap-worktree ladder around one git worktree add: what runs before real Git and after it, on Linux; on other systems the ladder does nothing and Git’s own checkout stands. Why: doc/planning/cli-git-btrfs-worktree.md designs the ladder and measures it: a snapshot of a clean subvolume worktree, then clones of its tracked files, then Git’s own checkout. The lifecycle of the copy (worktree_copy.rs) calls this one module, so the rungs stay out of its settlement and recovery code.

In TS you’d write (pseudocode):

const ladder = beginLadder(plan, context, identity);
const git = await runGit(ladder.firstStep());
const { git: status, carried } = await ladder.finish(git, ...);

Re-exports§

pub use crate::worktree_ladder_run::Ladder;
pub use crate::worktree_ladder_run::LadderResult;
pub use crate::worktree_ladder_run::begin_ladder;