jakewilliami / gl

A Git log command line utility
MIT License
1 stars 0 forks source link

Only allow one functional option at a time #31

Closed jakewilliami closed 2 weeks ago

jakewilliami commented 2 weeks ago

The primary change here is using an argument group to collect different arguments (which is then flattened in the primary Cli struct that derives the argument parser). Importantly, this argument group contains the options that do functional things. It also specifies multiple = false, meaning that we can only run gl with one functional option at a time. (Note that there are still non- functional options that you can use, such as --rev and --all which will change the way gl's base functionality (pretty logging) will print.) This change closes #28.

I have considered this a breaking change because you were previously able to run the program with multiple options specified, but this is no longer allowed.

While we are making changes that can be considered breaking changes, we take the opportunity to do a few more outrageous things:

The whole change goes a good way towards addressing #2.