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

Re: [PATCH v3] status: refactor output format to represent "default" and add --long

From
Jeff King <peff@peff.net>
Date
Oct 18, 2012, 21:20 UTC
Message-ID
<20121018212057.GA3192@sigill.intra.peff.net>
In-Reply-To
<7vtxtrlbvo.fsf@alter.siamese.dyndns.org>
On Thu, Oct 18, 2012 at 02:16:11PM -0700, Junio C Hamano wrote:
> I guess combining both is fine, but then the commit is no longer "in
> preparation for adding" the option, but it already adds "--long", I
> would think.
Maybe a better commit message is:
-- >8 --
Subject: status: add --long output format option

You can currently set the output format to --short or --porcelain. There is no --long, because we default to it already. However, you may want to override an alias that uses "--short" to get back to the default.

This requires a little bit of refactoring, because currently we use STATUS_FORMAT_LONG internally to mean the same as "the user did not specify anything". By expanding the enum to include STATUS_FORMAT_NONE, we can distinguish between the implicit and explicit cases. This effects these conditions:

  1. The user has asked for NUL termination. With NONE, we
     currently default to turning on the porcelain mode.
     With an explicit --long, we would in theory use NUL
     termination with the long mode, but it does not support
     it. So we can just complain and die.
  2. When an output format is given to "git commit", we
     default to "--dry-run". This behavior would now kick in
     when "--long" is given, too.
Previous: Junio C Hamano
Message 10 of 10 in “status: add --long for default format”
  1. status: add --long for default formatNguyễn Thái Ngọc Duy, Oct 16, 2012
  2. Jeff KingOct 16, 2012
  3. Jeff KingOct 16, 2012
  4. 1/2 status: refactor output format to represent "default"Nguyễn Thái Ngọc Duy, Oct 18, 2012
  5. 2/2 status: add --long for default formatNguyễn Thái Ngọc Duy, Oct 18, 2012
  6. Jeff KingOct 18, 2012
  7. status: refactor output format to represent "default" and add --longNguyễn Thái Ngọc Duy, Oct 18, 2012
  8. Jeff KingOct 18, 2012
  9. Junio C HamanoOct 18, 2012
  10. Jeff KingOct 18, 2012

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.