Expand description
Git worktrees cloned from a per-repository template checkout, sharing disk blocks until written.
macOS clones with cp -c (clonefile), Linux with cp --reflink=always (FICLONE)
Functions§
- add
- Create
wtby cloningtemplate, refreshed totemplate_startand warmed fromrepofirst.new_branchandcommitisharegit worktree add’s; on error nothing is left behind - can_
clone - Whether a file in
src_dirclones intodst_dir: both on one volume that supports it. Probed with one small file, since filesystem names miss mount options like XFS without reflink - git
- Runs git in
dirand returns its trimmed stdout - warm
- Refresh an existing
templatewith the gitignored directories ofsrc, a checkout or a worktree whose work merged