[moveonly] Extract HelpRequested to dry up the help options testing #12846

pull Empact wants to merge 1 commits into bitcoin:master from Empact:dry-help changing 7 files +14 −9
  1. Empact commented at 8:54 pm on March 30, 2018: member
    This ensures consistency across interfaces and makes the version handling more clear.
  2. fanquake added the label Refactoring on Mar 31, 2018
  3. promag commented at 8:31 pm on March 31, 2018: member

    utACK 9a7be59.

    Just want to point that HelpRequested is only called 5 times, IMO it is worth doing this.

    Just want to throw two ideas:

    • how about gArgs.IsHelpArgSet() or alike?
    • HelpRequested() without arguments since gArgs is global?
  4. Empact commented at 10:58 pm on March 31, 2018: member
    I could go either way on both points.
  5. jnewbery commented at 8:49 pm on April 2, 2018: member

    utACK 9a7be5971a0794bc7e6338443add75336f2efd91.

    I could go either way on both points.

    I feel the same way.

  6. in src/util.cpp:588 in 9a7be5971a outdated
    583@@ -584,7 +584,9 @@ void ArgsManager::ForceSetArg(const std::string& strArg, const std::string& strV
    584     mapMultiArgs[strArg] = {strValue};
    585 }
    586 
    587-
    588+bool HelpRequested(const ArgsManager& args) {
    589+  return args.IsArgSet("-?") || args.IsArgSet("-h") || args.IsArgSet("-help");
    


    ryanofsky commented at 10:14 pm on April 2, 2018:
    Indentation is off (should use 4 spaces)

    MarcoFalke commented at 10:17 pm on April 2, 2018:
    Note: Don’t forget to install clang-format and run the https://github.com/bitcoin/bitcoin/tree/master/contrib/devtools#clang-format-diffpy script to preempt whitespace nitpicking.

    Empact commented at 10:56 pm on April 2, 2018:
    Fixed, and thanks - I need to set up a hook for that. :P
  7. ryanofsky commented at 10:14 pm on April 2, 2018: member
    utACK 9a7be5971a0794bc7e6338443add75336f2efd91
  8. [moveonly] Extract HelpRequested to dry up the help options testing
    This ensures consistency across interfaces and makes the version handling more clear.
    b386970d07
  9. Empact force-pushed on Apr 2, 2018
  10. ryanofsky commented at 3:21 pm on April 3, 2018: member
    utACK b386970d0750e368d6adc5d0c010ead329b5c7c1. Just whitespace changes since last review.
  11. MarcoFalke commented at 3:50 pm on April 3, 2018: member
    utACK b386970d0750e368d6adc5d0c010ead329b5c7c1
  12. MarcoFalke merged this on Apr 3, 2018
  13. MarcoFalke closed this on Apr 3, 2018

  14. MarcoFalke referenced this in commit ad960f5771 on Apr 3, 2018
  15. Empact deleted the branch on Apr 4, 2018
  16. UdjinM6 referenced this in commit 67615ed417 on May 21, 2021
  17. UdjinM6 referenced this in commit d652b03333 on May 21, 2021
  18. UdjinM6 referenced this in commit 2eeb9eb51f on May 21, 2021
  19. UdjinM6 referenced this in commit 376457d129 on May 22, 2021
  20. kittywhiskers referenced this in commit 002c18c926 on May 25, 2021
  21. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-07-05 22:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me