parse-options: stop abusing 'callback' for lowlevel callbacks
Lowlevel callbacks have different function signatures. Add a new field in 'struct option' with the right type for lowlevel callbacks. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
f62470c650
commit
bf3ff338a2
@ -170,7 +170,8 @@ int parse_opt_noop_cb(const struct option *opt, const char *arg, int unset)
|
||||
* "-h" output even if it's not being handled directly by
|
||||
* parse_options().
|
||||
*/
|
||||
int parse_opt_unknown_cb(const struct option *opt, const char *arg, int unset)
|
||||
int parse_opt_unknown_cb(struct parse_opt_ctx_t *ctx,
|
||||
const struct option *opt, int unset)
|
||||
{
|
||||
return -2;
|
||||
}
|
||||
|
Reference in New Issue
Block a user