Page MenuHomePhabricator

ArgsManager: drop m_negated_args
ClosedPublic

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

Details

Reviewers
deadalnix
jasonbcox
Group Reviewers
Restricted Project
Commits
rABCc8ab745844c2: 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

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Fabien created this revision.Jan 29 2019, 14:00
Herald added a reviewer: Restricted Project. · View Herald TranscriptJan 29 2019, 14:00
Herald added a subscriber: schancel. · View Herald Transcript
jasonbcox edited the summary of this revision. (Show Details)Jan 29 2019, 18:54
jasonbcox accepted this revision.Jan 29 2019, 19:00
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
Fabien updated this revision to Diff 6994.Jan 29 2019, 19:29

Rebase and update release notes

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