Repository navigation
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
|
Scanning raw argv breaks valid calls that work on main. I built the PR head (2b5ab8f) and compared it with main and GNU cp 9.7:
The scan counts the Letting clap handle it avoids this: drop the |
9f4aeee to
0782e63
Compare
|
@fixfon Thanks for investigating, but please compare against GNU coreutils 9.12 or GNU coreutils master branch. |
|
@xtqqczze Re-ran this against GNU coreutils 9.12 (release tarball, built locally on Linux) and the current head (0782e63):
9.12 behaves the same as 9.7 on all five. The new head fixes the first three, and |
|
The conflict check now reads long options the way clap does, so |
|
GNU testsuite comparison: |
cb53e05 to
afac51c
Compare
|
a bunch of jobs are failing |
afac51c to
c81be25
Compare
c81be25 to
789de26
Compare
|
CI note (infrastructure issue, not related to the change in this PR): The No code changes in this PR are involved. |
789de26 to
0b2d732
Compare
Merging this PR will not alter performance1 warning
Comparing Footnotes
|
0b2d732 to
f03a414
Compare
f03a414 to
7e508d4
Compare
|
Binary size comparison: |
The conflict check compared raw long names, so `--sym -l` slipped past it even though clap resolves `--sym` to `--symbolic-link`. Resolve the name the way clap's `infer_long_args` does before comparing.
7e508d4 to
843f218
Compare
Problem
cp -s -l a.txt bsucceeds and createsb, whereas GNU cp rejects it:Change
Detect
-s/--symbolic-linktogether with-l/--linkand report an error. The flags are checked in the raw arguments because clap's mode overrides would otherwise let the later flag silently replace the earlier one. The corresponding-s/-lpairs were removed fromtest_cp_overriding_arguments, since they are now expected to conflict.Tests
Added
test_symbolic_link_and_link_conflictintests/by-util/test_cp.rs.Closes #15987