Page MenuHomePhabricator

ArgsManager: drop m_negated_args
ClosedPublic

Authored by Fabien on Tue, Jan 29, 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.Tue, Jan 29, 14:00
Herald added a reviewer: Restricted Project. · View Herald TranscriptTue, Jan 29, 14:00
Herald added a subscriber: schancel. · View Herald Transcript
jasonbcox edited the summary of this revision. (Show Details)Tue, Jan 29, 18:54
jasonbcox accepted this revision.Tue, Jan 29, 19:00
This revision is now accepted and ready to land.Tue, Jan 29, 19:00
jasonbcox requested changes to this revision.Tue, Jan 29, 19:05

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

This revision now requires changes to proceed.Tue, Jan 29, 19:05
Fabien updated this revision to Diff 6994.Tue, Jan 29, 19:29

Rebase and update release notes

jasonbcox accepted this revision.Tue, Jan 29, 23:04
This revision is now accepted and ready to land.Tue, Jan 29, 23:04
Closed by commit rABCc8ab745844c2: ArgsManager: drop m_negated_args (authored by Anthony Towns <aj@erisian.com.au>, committed by Fabien). · Explain WhyTue, Feb 5, 07:55
This revision was automatically updated to reflect the committed changes.