HomePhabricator

ArgsManager: drop m_negated_args

Authored by Anthony Towns <aj@erisian.com.au> on Apr 4 2018, 08:02.

Description

ArgsManager: drop m_negated_args

Summary:
When a -nofoo option is seen, instead of adding it to a separate
set of negated args, set the arg as being an empty vector of strings.

This changes the behaviour in some ways:

  • -nofoo=0 still sets foo=1 but no longer treats it as a negated arg
  • -nofoo=1 -foo=2 has GetArgs() return [2] rather than [2,0]
  • "foo=2 \n -nofoo=1" in a config file no longer returns [2,0], just [0]
  • GetArgs returns an empty vector for negated args

Partial backport of core PR11862 (commit 4d34fcc)

Depends on D2432

Test Plan:

make check

Reviewers: #bitcoin_abc, deadalnix, jasonbcox

Reviewed By: #bitcoin_abc, jasonbcox

Subscribers: teamcity, schancel

Differential Revision: https://reviews.bitcoinabc.org/D2433

Details

Committed
FabienFeb 5 2019, 07:55
Pushed
FabienFeb 5 2019, 07:55
Reviewer
Restricted Project
Differential Revision
D2433: ArgsManager: drop m_negated_args
Parents
rABCf9092cd61146: ArgsManager: keep command line and config file arguments separate
Branches
Unknown
Tags
Unknown

Event Timeline

Fabien committed rABCc8ab745844c2: ArgsManager: drop m_negated_args (authored by Anthony Towns <aj@erisian.com.au>).Feb 5 2019, 07:55