Re: [PATCH] Add an optional <mode> argument to commit/status -u|--untracked-files option
- From
Marius Storm-Olsen <marius@trolltech.com>
- Date
- Jun 3, 2008, 21:17 UTC
- Message-ID
- <4845B4E8.1040402@trolltech.com>
- In-Reply-To
- <20080603201421.GB17260@sigill.intra.peff.net>
Jeff King said the following on 03.06.2008 22:14:
Show 14 quoted lines
> On Tue, Jun 03, 2008 at 03:09:10PM +0200, Marius Storm-Olsen wrote: > >> +-u[<mode>]|--untracked-files[=<mode>]:: >> + Show all untracked files. >> + The mode parameter is optional, and is used to specify >> + the handling of untracked files. The possible options are: >> + none - Show no untracked files >> + normal - Shows untracked files and directories >> + all - Also shows individual files in untracked directories. >> + If the mode parameter is not specified, the defaults is >> + 'all'. > > Hmm. Doesn't this change bundling semantics of "git commit -us"? Do we > care?
You are right. This is the joy of the parse-options() handling of short-options with optional arguments.
-us before meant:
1) commit
2) show all untracked files
3) sign-of the commitI guess it would be possible to reparse the options without the -u, if the argument is not one of the three (none,normal,all), but I'm not sure it's _that_ critical. Opinions?
-- .marius