Re: [PATCH v2 2/2] teach git-archive to auto detect the output format
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 13, 2009, 21:27 UTC
- Message-ID
- <7v4or6o7qf.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <20090913201701.GH30385@dpotapov.dyndns.org>
Dmitry Potapov <dpotapov@gmail.com> writes:
Show 8 quoted lines
> On Sun, Sep 13, 2009 at 11:52:56AM -0700, Junio C Hamano wrote: >> > + sprintf(fmt_opt, "--format=%s", format); >> > + argv[argc++] = fmt_opt; >> > + argv[argc] = NULL; >> > Either --output or --format option was used before, and this option is > extracted from argv[] by parse_options(). So it should be space for at > least one argument in argv.
To my taste, that is a unwarranted (on the borderline) assumption of what parse_options() does, but I'll let it pass with some additional comment to warn readers of the code.
Applied.