Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2019-01-27 03:35:26 +0300
committerJunio C Hamano <gitster@pobox.com>2019-01-28 03:28:18 +0300
commitbf3ff338a25b7353ec6d39d31e14d081be9e3471 (patch)
tree125e179fe673c3b09cebbdeb105d7049ddd97498 /parse-options-cb.c
parentf62470c650e0db9536f32b9e1ecbe7d25f759031 (diff)
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>
Diffstat (limited to 'parse-options-cb.c')
-rw-r--r--parse-options-cb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/parse-options-cb.c b/parse-options-cb.c
index e2f3eaed07..e05bcea809 100644
--- a/parse-options-cb.c
+++ b/parse-options-cb.c
@@ -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;
}