Page MenuHomePhabricator

ArgsManager: drop m_negated_args
ClosedPublic

Authored by Fabien on Jan 29 2019, 14:00.

Details

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

Diff Detail

Repository
rABC Bitcoin ABC
Branch
PR11862_part2
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 4745
Build 7553: Bitcoin ABC Buildbot (legacy)
Build 7552: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Jan 29 2019, 19:00
jasonbcox requested changes to this revision.Jan 29 2019, 19:05

Some items in the summary need to be called out in release notes.

This revision now requires changes to proceed.Jan 29 2019, 19:05

Rebase and update release notes

This revision is now accepted and ready to land.Jan 29 2019, 23:04
This revision was automatically updated to reflect the committed changes.