]> asedeno.scripts.mit.edu Git - git.git/blobdiff - parse-options.h
parse-opt: add PARSE_OPT_KEEP_ARGV0 parser option.
[git.git] / parse-options.h
index 33c683cb5459f8da0e165e3d270a53a985227071..c5f0b4b4dabb5a40027c0cc588549904e0efcc6f 100644 (file)
@@ -20,6 +20,7 @@ enum parse_opt_type {
 enum parse_opt_flags {
        PARSE_OPT_KEEP_DASHDASH = 1,
        PARSE_OPT_STOP_AT_NON_OPTION = 2,
+       PARSE_OPT_KEEP_ARGV0 = 4,
 };
 
 enum parse_opt_option_flags {
@@ -119,6 +120,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;