sparse-checkout: fill in some options boilerplate
commit75d3bee15778a3aaeb8234023fc224838ac53181
authorJeff King <peff@peff.net>
Wed, 30 Sep 2020 12:30:10 +0000 (30 08:30 -0400)
committerJunio C Hamano <gitster@pobox.com>
Wed, 30 Sep 2020 19:53:48 +0000 (30 12:53 -0700)
tree32ecb59af1794650ae361386579f759f8459a9c8
parent20f4b044a681fffd469cc9ddcf055580a20fd612
sparse-checkout: fill in some options boilerplate

The sparse-checkout passes along argv and argc to its sub-command helper
functions. Many of these sub-commands do not yet take any command-line
options, and ignore those parameters.

Let's instead add empty option lists and make sure we call
parse_options(). That will give a useful error message for something
like:

  git sparse-checkout list --nonsense

which currently just silently ignores the unknown option.

As a bonus, it also silences some -Wunused-parameter warnings.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/sparse-checkout.c