1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//! What:
//! Package-manager and toolchain repair after a worktree is created.
//! Why:
//! Repair runs after worktree creation and has its own report.
//!
//! In TS you'd write (pseudocode):
//! ```ts
//! // repair/index.ts: one `export * from './file'` per module below.
//! ```
/// Starting one package-manager program for a worktree repair: finding it, running it with a limit, saying how it ended.
/// What a worktree repair prints: one line for success, one plain line per repair that could not finish.
/// Cloning one directory tree with its modes, times and links, for the build state Cargo keeps outside a worktree.
/// The pnpm repair of a new worktree: relink the copied `node_modules` offline against the frozen lockfile.
/// The Cargo repair of a new worktree: clone external build state, then clean the worktree's own crates.
/// The toolchain repair of a new worktree: rebuild the links and launchers that name another checkout's lock.
/// The repair of a new worktree's package-manager state after a rung filled it and the ignored files were copied.