summaryrefslogtreecommitdiff
path: root/parse-options.h
diff options
context:
space:
mode:
authorPierre Habouzit <madcoder@debian.org>2008-06-23 20:55:11 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-06-30 21:51:13 (GMT)
commit26141b5b60eea36f1d771312f6cae9e56dbbf760 (patch)
treea7e869a6ed39ba10b5e7d45d8ad0f18d0fee9096 /parse-options.h
parent07fe54db3cdf42500ac2e893b670fd74841afdc4 (diff)
downloadgit-26141b5b60eea36f1d771312f6cae9e56dbbf760.zip
git-26141b5b60eea36f1d771312f6cae9e56dbbf760.tar.gz
git-26141b5b60eea36f1d771312f6cae9e56dbbf760.tar.bz2
parse-opt: fake short strings for callers to believe in.
If we begin to parse -abc and that the parser knew about -a and -b, it will fake a -c switch for the caller to deal with. Of course in the case of -acb (supposing -c is not taking an argument) the caller will have to be especially clever to do the same thing. We could think about exposing an API to do so if it's really needed, but oh well... Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'parse-options.h')
-rw-r--r--parse-options.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/parse-options.h b/parse-options.h
index 33c683c..aeed627 100644
--- a/parse-options.h
+++ b/parse-options.h
@@ -119,6 +119,11 @@ enum {
PARSE_OPT_UNKNOWN,
};
+/*
+ * It's okay for the caller to consume argv/argc in the usual way.
+ * Other fields of that structure are private to parse-options and should not
+ * be modified in any way.
+ */
struct parse_opt_ctx_t {
const char **argv;
const char **out;