uutils / uutils/coreutils

Would be nice to have an option to reflink if possible and hardlink otherwise.

Open
#13,758 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

U - ln
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.