fix(cp): remove overrides_with_all from flag group#13258
Open
BAMF0 wants to merge 1 commit into
Open
Conversation
Contributor
Author
|
CI discovered some errors, I'll fix the test and linting failures |
|
GNU testsuite comparison: |
The -a/-L/-H/-P/-d flags form a mutual-exclusion group for symlink handling. Previously, claps overrides_with_all handled precedence by stripping earlier flags. However, -a is a composite flag (-dR --preserve=all), and stripping it wholesale loses recursive and --preserve=all. Fix: remove overrides_with_all from all five flags. All coexist in the clap match. Precedence is now handled in overriding_order: - Add DEREFERENCE, NO_DEREFERENCE, CLI_SYMBOLIC_LINKS to the order - Derive both dereference and cli_dereference from the last flag in the mutual-exclusion group Fixes: uutils#13207 Also fixes: - -dL: no longer loses Attributes::LINKS - -aH: dereference correctly respects last-flag-wins
9da5396 to
c83b92b
Compare
Merging this PR will improve performance by 4.84%
Performance Changes
Tip Curious why this is faster? Comment Comparing Footnotes
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
-a/-L/-H/-P/-dflags form a mutual-exclusion group for symlink handling. Previously, clap'soverrides_with_allhandled precedence by stripping earlier flags. However,-ais a composite flag(
-dR --preserve=all), and stripping it wholesale loses recursive and--preserve=all.Fix: remove
overrides_with_allfrom all five flags. All coexist in the clap match. Precedence is now handled in overriding_order:DEREFERENCE,NO_DEREFERENCE,CLI_SYMBOLIC_LINKSto the orderFixes: #13207
Also fixes:
-dL: no longer loses Attributes::LINKS-aH: dereference correctly respects last-flag-wins