Would be nice to have an option to reflink if possible and hardlink otherwise.
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 24.1k
- Forks
- 2k
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 365
Description
In cases where hardlinks are acceptable but a reflinks are preferred, it would be nice to have a way to tell cp to use that heuristic: make a reflink if possible, or a hard link otherwise.
On a related note, there is no =WHEN option for --link which could be useful.
I propose adding a new --reflink-or-link[=WHEN] option and extending --link to --link[=WHEN].
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the cp command entry point and locate the existing --link and --reflink option handling. Trace how link and reflink attempts report unsupported filesystems, then define tests covering --reflink-or-link[=WHEN] and --link[=WHEN]; done means the new heuristic and conditional behavior work as proposed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli, operating-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100