Files
bitcoin/src
merge-script 0f156c16e8 Merge bitcoin/bitcoin#35470: argsman: Prevent duplicate option registration across categories
32df86f1d8 argsman: Prevent duplicate option registration across categories (Pablo Martin)

Pull request description:

  Follow-up to #28802

  This PR enforces the invariant that option names are unique across categories.

  -<ins>_**Rationale**_</ins>:
  - While adapting the `argsman_tests.cpp` cases introduced in #28802 for the GNU-style parsing changes proposed in #33540, I noticed that the same option name can currently be registered in multiple categories.

  - At present in `master`, this ambiguity is largely masked by the existing command-line parsing behaviour. However, it relies on assumptions about how options are interpreted based on their position. Future changes to option parsing, such as the GNU-style parsing proposed in #33540, may expose this ambiguity and lead to unexpected option resolution.

  - To avoid ambiguous option resolution and make the distinction between global and command-specific options explicit, this PR adds validation in `AddArg()` preventing the same option name from being registered across different categories.

ACKs for top commit:
  sedited:
    ACK 32df86f1d8
  ryanofsky:
    Code review ACK 32df86f1d8. Thanks for the simplifications!

Tree-SHA512: 5d3cb951bd90c46cbd8205a229d49336c3a29e5100b7c50c5cba66979dd3cbd480ed42593caa272c6205eb7ac503af631a7e3531af0b726334e3448e17d5c0d5
2026-06-17 14:52:05 +02:00
..
2026-06-15 14:51:12 +01:00
2026-06-16 11:16:00 +02:00
2026-05-21 17:53:56 +02:00
2026-06-16 11:16:00 +02:00
2026-06-11 21:32:46 +02:00
2026-06-04 21:58:56 +10:00
2026-05-12 21:24:19 +02:00
2026-06-04 21:58:56 +10:00
2026-05-12 21:24:19 +02:00
2026-04-28 10:37:15 +02:00