uutils / uutils/coreutils

cp: --no-clobber --progress produces progress even if copy didn't happen because of target presence

Open
#6,930 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

U - cp
Dominant language
Rust
Stars
24.1k
Forks
2k
Avg merge
1d 5h
Merged PRs (30d)
365

Description

Tool: cp.
Version: commit c8bcdb926 (latest in main as of 2024-12-06).

STR:

  1. echo 'a' > a && cp --no-clobber --progress -v -T -- a b emits 1 line into stdout and 1 line into stderr as expected:
    1.a. 'a' -> 'b'
    1.b. cp: [00:00:00] █████████ 2 B/2 B
  2. Run cp --no-clobber --progress -v -T -- a b one more time.

Actual:

  1. This time tool emits nothing into stdout. It completely matches the expectation.
  2. It still emits progress into stderr like cp: [00:00:00] █████████ 2 B/2 B even though no copy happened.

Expected:

  1. Absolutely no output.

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 with the Rust implementation of the cp command and reproduce the two-step --no-clobber --progress -v -T command from the issue. Trace how an existing target is handled alongside progress reporting. Done means the second invocation emits no stdout or stderr when no copy occurs.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.