git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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:00 UTC
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:
Show 15 quoted lines
> Marius Storm-Olsen <marius@trolltech.com> writes:
> 
>> Determining untracked files can be a very slow operation on large trees.
>> This commit adds a <mode> 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.
Show 7 quoted lines
> 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.
Show 21 quoted lines
>> @@ -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[<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'.
> 
> 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

Previous: Junio C HamanoNext: Jeff King
Message 4 of 11 in “Add an optional <mode> argument to commit/status -u|--untracked-files option”
  1. Add an optional <mode> argument to commit/status -u|--untracked-files optionMarius Storm-Olsen, Jun 3, 2008
  2. Add configuration option for default untracked files modeMarius Storm-Olsen, Jun 3, 2008
  3. Junio C HamanoJun 3, 2008
  4. Marius Storm-OlsenJun 3, 2008
  5. Jeff KingJun 3, 2008
  6. Marius Storm-OlsenJun 3, 2008
  7. しらいしななこJun 3, 2008
  8. Jeff KingJun 3, 2008
  9. Alex RiesenJun 6, 2008
  10. Marius Storm-OlsenJun 6, 2008
  11. Jeff KingJun 3, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.