assert PARSE_OPT_NONEG in parse-options callbacks
commit8d2aa8dfac4048c964453a8983f1dc12ecdfe1c3
authorJeff King <peff@peff.net>
Wed, 30 Sep 2020 12:29:02 +0000 (30 08:29 -0400)
committerJunio C Hamano <gitster@pobox.com>
Wed, 30 Sep 2020 19:53:47 +0000 (30 12:53 -0700)
tree7fcfc22925c483d85e519390335a23ea866a6315
parent424e28fcadfe0a40e444687c10fb4eaff8360f8d
assert PARSE_OPT_NONEG in parse-options callbacks

In the spirit of 517fe807d6 (assert NOARG/NONEG behavior of
parse-options callbacks, 2018-11-05), let's cover some parse-options
callbacks which expect to be used with PARSE_OPT_NONEG but don't
explicitly assert that this is the case. These callbacks are all used
correctly in the current code, but this will help document their
expectations and future-proof the code.

As a bonus, it also silences -Wunused-parameters (these were added since
the initial sweep of 517fe807d6, and we can't yet turn on
-Wunused-parameters to remind people because it has too many existing
false positives).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/am.c
builtin/commit-graph.c
builtin/env--helper.c
parse-options-cb.c