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: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 commit

I 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

Previous: Jeff KingNext: しらいしななこ
Message 6 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.