clonetree_windows-amd64 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +50 -34
- package/clonetree-windows-amd64.exe +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -27,8 +27,8 @@ starting from the files on disk rather than a commit.
|
|
|
27
27
|
- **Share file storage.** Files are separate, but their existing data is not
|
|
28
28
|
copied again. More space is used as either copy changes.
|
|
29
29
|
|
|
30
|
-
In our [APFS benchmark](#benchmark), a **
|
|
31
|
-
|
|
30
|
+
In our [APFS benchmark](#benchmark), a **57.1 GiB checkout** with **320,652 files**
|
|
31
|
+
cloned in **9.9 seconds** on average.
|
|
32
32
|
|
|
33
33
|
**Requires macOS with APFS, or Linux with reflink-enabled XFS/Btrfs.** Source and
|
|
34
34
|
destination must be on the same filesystem. No Git repository is required.
|
|
@@ -40,10 +40,10 @@ destination must be on the same filesystem. No Git repository is required.
|
|
|
40
40
|
brew install sprisa/tap/clonetree
|
|
41
41
|
|
|
42
42
|
# npm
|
|
43
|
-
|
|
43
|
+
npx clonetree
|
|
44
44
|
|
|
45
45
|
# Go 1.24+
|
|
46
|
-
go
|
|
46
|
+
go run github.com/sprisa/clonetree@latest
|
|
47
47
|
```
|
|
48
48
|
|
|
49
49
|
Or run without a global installation: `npx clonetree --help`.
|
|
@@ -134,53 +134,69 @@ snapshots and shows their logical size and private storage where available:
|
|
|
134
134
|
| `SIZE` | Logical file content, including data shared with other clones |
|
|
135
135
|
| `PRIVATE` | Storage not shared with another clone or filesystem snapshot (APFS); `n/a` when unavailable |
|
|
136
136
|
|
|
137
|
+
Measuring `PRIVATE` asks APFS how much file data is unshared. When you only need
|
|
138
|
+
the `SIZE` column, skip that work to use less CPU:
|
|
139
|
+
|
|
140
|
+
```sh
|
|
141
|
+
clonetree info --skip-private-size
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
This shows `ID` and `SIZE`, omitting private-storage queries and the `PRIVATE`
|
|
145
|
+
column. It still walks the files to calculate `SIZE`.
|
|
146
|
+
|
|
137
147
|
### Control progress output
|
|
138
148
|
|
|
139
|
-
Interactive runs show
|
|
140
|
-
|
|
149
|
+
Interactive runs show the current phase and elapsed time. APFS clones identify the
|
|
150
|
+
directory being cloned and advance checked-entry progress during metadata
|
|
151
|
+
validation. Per-file rates and ETAs are omitted for native batches.
|
|
152
|
+
|
|
153
|
+
For plain output:
|
|
141
154
|
|
|
142
155
|
```sh
|
|
143
156
|
clonetree --no-progress new experiment
|
|
144
157
|
```
|
|
145
158
|
|
|
146
|
-
Non-interactive runs disable progress automatically.
|
|
147
|
-
`--no-progress` runs skip the initial entry-counting pass.
|
|
159
|
+
Non-interactive runs disable progress automatically.
|
|
148
160
|
|
|
149
|
-
|
|
161
|
+
### Stop a running command
|
|
162
|
+
|
|
163
|
+
Press **Ctrl+C** to cancel. Clonetree acknowledges the request immediately and
|
|
164
|
+
shows when it is removing the partial clone. Large partial trees can take several
|
|
165
|
+
seconds to delete.
|
|
150
166
|
|
|
151
|
-
**
|
|
152
|
-
|
|
167
|
+
Press **Ctrl+C again** to exit without waiting for cleanup. If a partial clone
|
|
168
|
+
remains, remove it with `clonetree delete <id>` using the same `--dir` parent.
|
|
153
169
|
|
|
154
|
-
|
|
155
|
-
macOS 27.0.1, and APFS. Additional disk usage is a filesystem free-space estimate;
|
|
156
|
-
timings and space usage vary with filesystem state and other disk activity.
|
|
170
|
+
## Benchmark
|
|
157
171
|
|
|
158
|
-
|
|
159
|
-
|
|
172
|
+
A **57.1 GiB** directory containing **320,652 files**, **59,778 directories**, and
|
|
173
|
+
**16,844 symlinks** was cloned on an Apple M4 Max with 128 GiB RAM, macOS 27.0.1,
|
|
174
|
+
APFS, and Go 1.27.3:
|
|
160
175
|
|
|
161
|
-
|
|
|
176
|
+
| Measurement | Result |
|
|
162
177
|
| --- | ---: |
|
|
163
|
-
|
|
|
164
|
-
|
|
|
165
|
-
|
|
|
166
|
-
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
findings, and collection-disabled memory measurements.
|
|
176
|
-
|
|
177
|
-
</details>
|
|
178
|
+
| Mean clone time | **9.9s** |
|
|
179
|
+
| Mean process CPU time | **8.4s** |
|
|
180
|
+
| Mean peak resident memory (RSS) | **14.0 MiB** |
|
|
181
|
+
| Sampled peak Go heap | **4.9 MiB** |
|
|
182
|
+
|
|
183
|
+
Timing and RSS are means of two runs. Heap was sampled separately. Source
|
|
184
|
+
preparation, output verification, and deletion are excluded from the timings;
|
|
185
|
+
filesystem caches were not cleared. Results depend on entry count, filesystem
|
|
186
|
+
state, and other disk activity.
|
|
187
|
+
|
|
188
|
+
See [performance](PERFORMANCE.md) for workload details, memory scaling, and
|
|
189
|
+
benchmark commands.
|
|
178
190
|
|
|
179
191
|
## How it works
|
|
180
192
|
|
|
181
193
|
### Native copy-on-write
|
|
182
194
|
|
|
183
|
-
Clonetree
|
|
195
|
+
Clonetree scans the current directory. On APFS, ordinary subtrees use native
|
|
196
|
+
directory cloning; exclusions, special metadata, and unsupported directory-clone
|
|
197
|
+
operations use the native per-file path. The completed subtrees are checked for
|
|
198
|
+
exclusions and their directory timestamps are restored.
|
|
199
|
+
|
|
184
200
|
The new files initially share data blocks with the originals. Editing either file
|
|
185
201
|
allocates storage for its changes without changing the other file's contents.
|
|
186
202
|
|
|
@@ -232,7 +248,7 @@ discover the original parent repository.
|
|
|
232
248
|
| Looking for… | Start here |
|
|
233
249
|
| --- | --- |
|
|
234
250
|
| Commands and flags | `clonetree --help` or `clonetree <command> --help` |
|
|
235
|
-
|
|
|
251
|
+
| Runtime, memory use, and benchmark commands | [Performance](PERFORMANCE.md) |
|
|
236
252
|
| Native APFS tests and XFS/Btrfs tests in Ubuntu Docker or a VM | [Testing](TESTING.md) |
|
|
237
253
|
| Logo and social-preview artwork | [Brand assets](docs/BRANDING.md) |
|
|
238
254
|
|
|
Binary file
|
package/package.json
CHANGED