From 6acec0380bfcd5e3f91c9100bf4d415db8f7acfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Scharfe?= Date: Wed, 28 Sep 2011 19:44:30 +0200 Subject: parseopt: add OPT_NOOP_NOARG Add OPT_NOOP_NOARG, a helper macro to define deprecated options in a standard way. The help text is taken from the no-op option -r of git revert. The callback could be made to emit a (conditional?) warning later. And we could also add OPT_NOOP (requiring an argument) etc. as needed. Signed-off-by: Rene Scharfe Signed-off-by: Junio C Hamano --- parse-options-cb.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'parse-options-cb.c') diff --git a/parse-options-cb.c b/parse-options-cb.c index 6db0921fc1..0de5fb168a 100644 --- a/parse-options-cb.c +++ b/parse-options-cb.c @@ -123,3 +123,8 @@ int parse_opt_string_list(const struct option *opt, const char *arg, int unset) string_list_append(v, xstrdup(arg)); return 0; } + +int parse_opt_noop_cb(const struct option *opt, const char *arg, int unset) +{ + return 0; +} -- cgit v1.2.3