Re: [PATCH 1/4] Add a simple option parser for use by builtin-commit.c.
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Oct 1, 2007, 10:14 UTC
- Message-ID
- <Pine.LNX.4.64.0710011114310.28395@racer.site>
- In-Reply-To
- <20070930131133.GA11209@diku.dk>
Hi,
On Sun, 30 Sep 2007, Jonas Fonseca wrote:
> Also, I think for this to be more usable for other built-in programs it > shouldn't modify argv, but instead take both argc and argv (so we don't > need to have code like "*++(*argv)" ;), parse _all_ options in one go, > and return the index (of argv) for any remaining options.
We _have_ to modify argv. For example, "git log master -p" is perfectly valid.
Ciao, Dscho