Repository navigation
join: implement last-flag-wins for --check-order/--nocheck-order - #16074
naufalfx805-source wants to merge 2 commits into
Conversation
GNU coreutils uses last-flag-wins semantics when both --check-order and --nocheck-order are specified. Match that behavior by tracking argument indices. Fixes uutils#16004 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Gc3pLfULRGQmfBnqr3oo3D
|
I think you can do it with clap |
Merging this PR will not alter performance
Comparing Footnotes
|
Replace manual indices_of() comparison with clap's built-in overrides_with mechanism, as suggested in review. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Gc3pLfULRGQmfBnqr3oo3D
|
Good call — refactored to use |
|
Duplicate of #16013 Anyway, thanks for your PR! |
Summary
--check-order/--nocheck-orderinjoin, matching GNU coreutils behaviorindices_of()to compare argument positions, following the existing pattern inls,cp, anddu--check-orderalways won regardless of command-line orderRepro (from #16004)
Test plan
cargo test --test coreutils test_join::check_order_nocheck_order_last_wins--check-order --nocheck-order(nocheck wins) and--nocheck-order --check-order(check wins)Fixes #16004
🤖 Generated with Claude Code
https://claude.ai/code/session_01Gc3pLfULRGQmfBnqr3oo3D