summaryrefslogtreecommitdiff
path: root/parse-options-cb.c
diff options
context:
space:
mode:
authorRené Scharfe <rene.scharfe@lsrfire.ath.cx>2011-09-28 19:44:30 +0200
committerJunio C Hamano <gitster@pobox.com>2011-09-28 12:46:21 -0700
commit6acec0380bfcd5e3f91c9100bf4d415db8f7acfd (patch)
tree16f376495294910ce5ab5b52415a4e8a774d5936 /parse-options-cb.c
parentf858c646b5428519c4f847c5f15a9ead72a62b16 (diff)
downloadgit-6acec0380bfcd5e3f91c9100bf4d415db8f7acfd.tar.gz
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 <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'parse-options-cb.c')
-rw-r--r--parse-options-cb.c5
1 files changed, 5 insertions, 0 deletions
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;
+}