From: Marius Storm-Olsen Date: Tue, 03 Jun 2008 21:00:23 GMT Subject: Re: [PATCH] Add an optional argument to commit/status -u|--untracked-files option Message-ID: <4845B0E7.2090502@trolltech.com> In-Reply-To: <7vod6i1e3p.fsf@gitster.siamese.dyndns.org> Junio C Hamano said the following on 03.06.2008 22:02: > Marius Storm-Olsen writes: > >> Determining untracked files can be a very slow operation on large trees. >> This commit adds a argument, which allows you to avoid showing the >> untracked files in a repository. Possible options are: >> none - Show no untracked files >> normal - Show untracked files and directories >> all - Show all untracked files >> >> If the optional argument is not specified, the option defaults to 'all'. > > You got me worried. You are defaulting the parameter of "-u" to 'all', > not making the command default (in the absense of -u anything) to "-u > all", which was what I misunderstood on my first reading. "the optional > parameter defaults to 'all'" is what you meant... Ok, I'll rewrite it to make it more clear. > enum {NONE,NORMAL,ALL}_UNTRACKED are named (1) too generic, in a sense > that it is not clear _what_ is done to the class of untracked worktree > entities, and/or (2) opposite from other enums where common prefix is > followed by differing part. > > Perhaps renaming them to SHOW_{NONE,NORMAL,ALL}_UNTRACKED would make it > easier to read. Sure. > It would have been nicer if this patch was further split into two; the > first one to introduce NORMAL and ALL without changing any behaviour, then > the second one to add NONE to introduce a new behaviour, with tests so > that other people will not break this new feature in their later changes. Ok, will do. >> @@ -150,12 +150,15 @@ but can be used to amend a merge commit. >> the last commit without committing changes that have >> already been staged. >> >> --u|--untracked-files:: >> - Show all untracked files, also those in uninteresting >> - directories, in the "Untracked files:" section of commit >> - message template. Without this option only its name and >> - a trailing slash are displayed for each untracked >> - directory. >> +-u[]|--untracked-files[=]:: >> + 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'. > > Does this mark-up actually work? I haven't actually run it through AsciiDoc. I'll make sure that it handles the next version of the patch(es). Thanks for checking the patches! -- .marius