How it works
Copy, re-address, measure: what a run does in order.
A run does three things in order, and the first is the cheap one.
| Stage | What happens |
|---|---|
| Copying | gitto copies the whole directory with the filesystem's clone call, so the copy shares its blocks with the canonical and costs only the metadata. Nothing is excluded and nothing is rebuilt: .git, the submodules, node_modules, the build directory and the untracked local files all come along. |
| Re-addressing | Then it walks what the copy now claims about itself and applies one of three dispositions. |
| Measuring the filesystem | Before any of that, gitto writes a 32 MB probe file, clones it with the system call, and compares free space before and after. A copy that consumed the probe's own size was a full copy, whatever the exit status said. |
remove
Deletes a clone, once it has established that nothing would be lost.
Copying
`gitto` copies the whole directory with the filesystem's clone call, so the copy shares its blocks with the canonical and costs only the metadata. Nothing is excluded and nothing is rebuilt: `.git`, the submodules, `node_modules`, the build directory and the untracked local files all come along.