You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[bug] cp -n: skips without GNU's "not replacing" diagnostic and returns 0 #1879
[bug] cp -n: skips without GNU's "not replacing" diagnostic and returns 0
Found by re-running the 2026-11-25 nightly WinuxCmd probes against a pristine GNU coreutils 9.4 oracle (tarball build). The old comparison had used the Ubuntu noble .deb, whose cp -n is patched to the same behavior as winuxcmd, masking this.
GNU: prints cp: not replacing 'keep.txt', rc=1; target keeps ORIGINAL.
winuxcmd: prints cp: warning: behavior of -n is non-portable…, rc=0; target also keeps ORIGINAL.
Fresh target: GNU copies silently (stderr 0 bytes); winuxcmd copies but still prints the same 96-byte warning.
Source check: pristine 9.4 src/copy.c skip branch prints not replacing and returns failure; the string non-portable does not occur anywhere in the pristine 9.4 tree. winuxcmd matches the Ubuntu .deb's patched behavior, not pristine GNU.
Expected: match pristine GNU 9.4 — skip prints cp: not replacing '<dst>' and returns 1; a successful copy under -n prints nothing.
Activity
Merge pull request #1978 from unixwin/captain/1879-cp-n-always-no
caomengxuan666 commentedon Nov 29, 2026
队长核验:由 PR #1978 合入修复并关闭(head 088737f,run 46301815810 attempt 2)。
CI 裁决要点:
语义核验(与 pristine GNU coreutils 9.4 oracle 对照):
rust2(port+wire): cat -> rust2 library + bridge (#1488) (#1882)
rust2(port+wire): uniq -> rust2 library + bridge (#1488) (#1877)