parse-opt: add PARSE_OPT_KEEP_ARGV0 parser option.
This way, argv[0] isn't clobbered when parse-options filters argv[]. Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
26141b5b60
commit
a32a4eaa36
@ -248,6 +248,7 @@ void parse_options_start(struct parse_opt_ctx_t *ctx,
|
||||
ctx->argc = argc - 1;
|
||||
ctx->argv = argv + 1;
|
||||
ctx->out = argv;
|
||||
ctx->cpidx = ((flags & PARSE_OPT_KEEP_ARGV0) != 0);
|
||||
ctx->flags = flags;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user