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

Re: [PATCH 1/2] status: really ignore config with --porcelain

From
Jeff King <peff@peff.net>
Date
Jun 28, 2013, 19:31 UTC
Message-ID
<20130628193104.GA12625@sigill.intra.peff.net>
In-Reply-To
<7vhagip25l.fsf@alter.siamese.dyndns.org>
On Fri, Jun 28, 2013 at 10:37:26AM -0700, Junio C Hamano wrote:
Show 14 quoted lines
> > The final patch ended up folding that "-z" default logic into the
> > same function, so it probably is saner to remove UNSPECIFIED.
> 
> Actually, the code needs to be able to differentiate between
> 
> 	git status --no-short
>         git status
> 
> the former telling us explicitly to defeat status.short while the
> latter telling us to use whatever random value we happen to have in
> the configuration.  Initializing the variable to UNSPECIFIED is one
> way to achieve that, as the former will explicitly set it to NONE
> while the latter will leave it UNSPECIFIED when the command line
> parsing finishes.

Hmm. I would have thought --no-short would just set it to LONG. That is, we are no longer NONE at that point, as the user has told us something on the command line. So we are whatever --no-short is, which is LONG.

But I guess that would wreck
  git status --no-short -z

which currently defaults to porcelain. Which, to be honest, seems a little crazy to me, but I guess there is no reason to break it.

I am just trying to prevent the future maintenance confusion where a reader of the code says "Huh? What is the difference between NONE and UNSPECIFIED?"

-Peff
Previous: Junio C HamanoNext: Junio C Hamano
Message 17 of 25 in “Fix serious regressions in latest master”
  1. 0/2 Fix serious regressions in latest masterRamkumar Ramachandra, Jun 24, 2013
  2. 1/2 status: really ignore config with --porcelainRamkumar Ramachandra, Jun 24, 2013
  3. Matthieu MoyJun 24, 2013
  4. Ramkumar RamachandraJun 24, 2013
  5. Matthieu MoyJun 24, 2013
  6. Junio C HamanoJun 24, 2013
  7. Matthieu MoyJun 24, 2013
  8. Junio C HamanoJun 24, 2013
  9. Matthieu MoyJun 24, 2013
  10. Junio C HamanoJun 24, 2013
  11. Ramkumar RamachandraJun 24, 2013
  12. Junio C HamanoJun 24, 2013
  13. Junio C HamanoJun 24, 2013
  14. Jeff KingJun 28, 2013
  15. Junio C HamanoJun 28, 2013
  16. Junio C HamanoJun 28, 2013
  17. Jeff KingJun 28, 2013
  18. Junio C HamanoJun 28, 2013
  19. Ramkumar RamachandraJun 24, 2013
  20. Junio C HamanoJun 24, 2013
  21. Matthieu MoyJun 24, 2013
  22. Ramkumar RamachandraJun 24, 2013
  23. 2/2 commit: make it work with status.shortRamkumar Ramachandra, Jun 24, 2013
  24. Junio C HamanoJun 24, 2013
  25. Ramkumar RamachandraJun 24, 2013

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.