Re: [PATCH v4 11/16] bisect--helper: return only correct exit codes in `cmd_*()`
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Jun 27, 2022, 20:09 UTC
- Message-ID
- <220627.86ilolhnnn.gmgdl@evledraar.gmail.com>
- In-Reply-To
- <ce508583e455a1dbb7620a238edb11dae195f00d.1656354677.git.gitgitgadget@gmail.com>
On Mon, Jun 27 2022, Johannes Schindelin via GitGitGadget wrote:
> From: Johannes Schindelin <johannes.schindelin@gmx.de> > > Exit codes cannot be negative, but `error()` returns -1.
That's good, but...
> Let's just go with the common pattern and call `die()` in > `cmd_bisect__helper()` when incorrect arguments were detected.
...the common and correct pattern on bad options is to return 129, not 128, which using use usage_msg_opt() instead of die() here would give you for free. I think this should use that instead.