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 --- Documentation/technical/api-parse-options.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Documentation/technical/api-parse-options.txt') diff --git a/Documentation/technical/api-parse-options.txt b/Documentation/technical/api-parse-options.txt index acf17607df..4b92514f60 100644 --- a/Documentation/technical/api-parse-options.txt +++ b/Documentation/technical/api-parse-options.txt @@ -204,6 +204,11 @@ There are some macros to easily define options: "auto", set `int_var` to 1 if stdout is a tty or a pager, 0 otherwise. +`OPT_NOOP_NOARG(short, long)`:: + Introduce an option that has no effect and takes no arguments. + Use it to hide deprecated options that are still to be recognized + and ignored silently. + The last element of the array must be `OPT_END()`. -- cgit v1.2.3