Expand description
The proof that a move lost nothing.
A migration takes one of these before a worktree moves and one after, and refuses to call the move a success unless they are equal. It is strong enough to notice a lost untracked file, a dropped staged change, a modified tracked file that reverted, a branch that switched or a HEAD that moved; it is deliberately not taken on any hot path, because it hashes the content of every modified and untracked file. Migration is exceptional and data safety is worth more there than a few milliseconds.
Ignored content (build output, the checkout’s own .ai/local/ state) is attested by
presence and size rather than by content: it moves with the directory as everything else
does, and hashing a target/ tree to prove a rename would cost minutes for nothing.
Structs§
- Worktree
Fingerprint - What a work tree held at one moment, reduced to digests.
Functions§
- capture
- Take a fingerprint of
worktree.whole_treealso walks the directory for the tree manifest, which a copy-based move needs and a rename does not. - differences
- Everything that differs between two fingerprints, one line each. Empty means equal.
- tree_
manifest - Every entry below
root, relative, sorted, with kind, size and link target. The.gitfile of a linked worktree is excluded: it is rewritten by the move on purpose.