Commit fa02a7c
authored
feat!: hardlink deduplications (#291)
* feat!: hardlink deduplications (wip)
* test: multiple hardlinks to a single file
* fix: algorithm
* test: children
* refactor: allow customization
* feat(api): re-export `dashmap`
* feat: report deduplication results
* refactor: use `0.into()` instead
* refactor: just use `default`
* feat(api): ability to cause errors
* feat!: report hardlinks to progress
* feat(api): stop exposing `dashmap`
* feat(api): obscure container type
* docs: fix
* feat(api): newtype for inode numbers
* feat(api): make `Event` `non_exhaustive`
* feat(api): rename a struct
* feat: show shared links before errors
* feat(api): `ProgressReport::shared` should be `Size`
* perf: reduce string resizing
* feat(api): rename some structs
* feat(api): move `HardlinkList` to `hardlink`
* docs: fix
* feat(api): reflection types for hardlink types
* fix(windows): dependencies
* feat(json)!: add optional `shared-inodes`
* feat(api): add some aliases
* docs: correction
* docs: correction
* feat(api): `into_reflection`
* feat(api): `HardlinkList::{len,is_empty}`
* feat(json): output the hardlink record
* chore(git): revert a wrong change
This reverts commit 4efa9b9.
* fix(json): move `"shared-inodes"` out of `"tree"`
* feat(api)!: rename `UnitAndTree` to `JsonDataBody`
* feat(windows): error on unsupported feature
* fix(json): `--json-input` with `--shared-inodes`
* feat(json): rename `"shared-inodes"` to `"shared"`
* refactor: this looks better
* feat(json): always sort `shared` by `ino`
* fix: git merge artifact
* fix: `TEXT_MAX_LEN`
* feat(api)!: remove `hook`
* feat(api): add some aliases
* feat(api): re-export `RecordHardlinksArgument`
* feat(api): create some aliases
* feat(api): expose `aware` and `ignorant`
* feat(api): simplify, eliminate `.clone()`
* refactor: shorten, consistency
* refactor: rename a trait to match its sole method
* refactor: shorten a name
* docs: `HardlinkAware::new`
* refactor: use `SmartDefault`
* feat(api): `DeduplicateSharedSize`
* refactor: move POSIX-exclusive code to its own module
* feat(api): `Reflection::{new,len,is_empty}`
* feat(api): `Reflection::iter`
* feat(api): summarize `HardlinkList`
* fix: compilation conditionals
* feat(api): `Reflection::{len,is_empty}`
* feat(json): `.shared.{details,summary}`
* feat(api): `Default` for `JsonShared`
* fix: report hardlinks
* feat(api): shorten a method name
* test: fix
* feat(json): print hardlinks summary
* fix(json): missing `shared`
* fix: clippy
* feat(json): omit `.shared.{details,summary}`
* feat(cli): forbid `--json-input` + `--deduplicate-hardlinks`
* feat(cli): define some aliases
* chore: generate completions
* refactor: prefer arrays
* docs(cli): make some aliases visible
* refactor: move iterators to its own module
* refactor: move iterator to its own module
* feat(api)!: pass params into `Sub::json_output`
* feat(api): convert `Infallible` to `RuntimeError`
* docs: add some text
* feat(api): make `RecordHardlinks` fallible
* feat(api): move instead of mutate
* feat: output json despite deduplication failures
* refactor: replace qualified with use
* feat: report the number of unrecorded links (wip)
* feat: report the number of unrecorded links
* fix: message
* fix: grammar
* feat: remove extra trailing newline
* feat(api): stop relying on `Into`
* feat(api): remove unneeded impls
* feat(api): better names
* docs: be more specific
* feat(api): revert back to mutations
This reverts commit 8f79037.
* docs: real solutions
* docs: I have decided that I don't care
There's just too many ways to create invalid tree (such as implementing
a custom trait incorrectly for example) that it's not worth the efforts
* fix: windows
* test: fix windows
* fix: windows
* fix: windows
* test: fix windows
* test: fix windows
* test: fix windows
* test: fix windows
* test: fix windows
* chore: remove a lint silencer
* docs: resolve a todo
* feat(api): summary on no hardlinks
* docs: resolve a todo
* feat(api): remove eq traits from `LinkPathList`
The order of items is non-deterministic
* docs: more details
* docs: correction
* test: reflections' equality
* feat: assert links equal
* test: change detection
* fix: windows
* ci(benchmark): add `deduplicate-hardlinks`
* docs(cli): add examples
* docs(cli): consistent wording
* docs(cli): more accurate description
* chore: update completions
* docs(readme): update regarding hardlinks
* fix: windows
* refactor: longer dot chain
* test: prepare some functions
* refactor: word wrap consistently
* test: less confusing names
* feat(api): add missing `Mul<usize>`
* fix(test): create the files
* docs: fix grammar
* test: complex tree
* style: add an empty line
* refactor: rearrange
* test: hardlinks summary
* refactor: use `.into_sorted_by`
* test: hardlinks details
* docs: plan
* refactor: rename a function
* refactor: add `.as_ref`
* test: add some (wip)
* test: sorted
* test: unique inodes
* test: combine
* test: correct setup function
* test: more even number
* test: summary
* test: use `assert_eq`
* test: without deduplication
* test: consistent convention
* test: create fewer files
* refactor: better formula
* docs: remove irrelevant comment
* test: `into_sorted_by_key`
* test: some hardlinks with deduplication
* refactor: remove unnecessary `vec!`
* test: hardlinks summary text
* refactor: shorten the code
* test: some hardlinks without deduplication
* refactor: rearrange
* refactor: split a test file
* refactor: rename a test file
* refactor: remove repeating suffices from test names
* feat(api): immutable setter methods
* chore(deps): add `derive_setters`
* feat(api): immutable setters for `Summary`
* test: exclusive hardlinks only
* test: mixing exclusive-only and external-only
* test: add a missing assertion
* test: external hardlinks only
* refactor: consistent naming
* test: simple tree with some hardlinks
* test: visualization
* style: remove some empty lines
* refactor: remove unnecessary cast
* feat: multiple arguments hardlinks deduplication
* test: multiple arguments hardlinks deduplication
* refactor: rename a test file
* feat: deduplicate arguments
* test: `remove_items_from_vec_by_indices`
* docs: quirk
* test: posix only
* refactor: use mockable trait
* test: add some tests
* test: correct `MockedApi::canonicalize`
* feat: spare symlinks from deduplication
* test: forgot to normalize
* test: fix `MockedApi::is_real_dir`
* test: fix a typo
* test: clear assertion message
* test: fix `resolve_symlink`
* test: add some tests
* style: missing trailing comma
* refactor: move tests to their own files
* test: deduplicate arguments
* chore: apply some suggestions
* style: apply copilot suggestion
* docs(cli): improve flag description
* refactor: use better terms1 parent 155c4f1 commit fa02a7c
49 files changed
Lines changed: 4895 additions & 92 deletions
File tree
- ci/github-actions/benchmark
- exports
- src
- app
- overlapping_arguments
- sub
- data_tree
- hardlink
- hardlink_list
- link_path_list
- reporter
- progress_and_error_reporter
- tests
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
| |||
72 | 73 | | |
73 | 74 | | |
74 | 75 | | |
| 76 | + | |
75 | 77 | | |
76 | 78 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
| 54 | + | |
53 | 55 | | |
54 | 56 | | |
55 | 57 | | |
56 | 58 | | |
57 | 59 | | |
58 | 60 | | |
59 | | - | |
60 | 61 | | |
61 | 62 | | |
62 | 63 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
114 | 125 | | |
115 | 126 | | |
116 | 127 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
32 | 35 | | |
33 | 36 | | |
34 | 37 | | |
35 | 38 | | |
36 | 39 | | |
37 | 40 | | |
| 41 | + | |
| 42 | + | |
38 | 43 | | |
39 | 44 | | |
40 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| 20 | + | |
| 21 | + | |
19 | 22 | | |
20 | 23 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
35 | 38 | | |
36 | 39 | | |
37 | 40 | | |
38 | 41 | | |
39 | 42 | | |
40 | 43 | | |
| 44 | + | |
| 45 | + | |
41 | 46 | | |
42 | 47 | | |
43 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
33 | 36 | | |
34 | 37 | | |
35 | 38 | | |
36 | 39 | | |
37 | 40 | | |
38 | 41 | | |
| 42 | + | |
| 43 | + | |
39 | 44 | | |
40 | 45 | | |
41 | 46 | | |
| |||
0 commit comments