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

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

From
Ramkumar Ramachandra <artagnon@gmail.com>
Date
Jun 24, 2013, 15:50 UTC
Message-ID
<CALkWK0kNFLn+XV2Ug3a1CtSkErCpfWZVO51z8xSNjD++uhHf2A@mail.gmail.com>
In-Reply-To
<7v8v1zd0du.fsf@alter.siamese.dyndns.org>
Junio C Hamano wrote:
Show 5 quoted lines
> Configuration related to the output format (like color=always) must
> be ignored under "--porcelain", but if we do not read core-ish
> configuration variables (e.g. core.crlf) that affect the logic to
> list what is changed what is not, we would not give the right
> result, no?
Ah, ofcourse.  My stupidity.
Show 5 quoted lines
>  My knee-jerk reaction is that, because the
> "--porcelain" output was designed to be extensible and scripts
> reading from it is expected to ignore what it does not understand,
> if the setting of status.branch is a problem, the reading side is
> buggy and needs to be fixed.
Are you 100% sure about this?
--porcelain::
	Give the output in an easy-to-parse format for scripts.
	This is similar to the short output, but will remain stable
	across Git versions and regardless of user configuration. See
	below for details.

status.branch is an exception, no doubt: it just adds one line clearly prefixed with "##" to the beginning, and any script can ignore it easily.

> Do we have in-core reader that does not behave well when one or both
> of these configuration variables are set (perhaps something related
> to submodule?)???

Yeah, the submodule.c parser is very naively written (see submodule.c:737), and I can fix it. But the bigger question still remains: if we have such a non-robust parser in git.git itself, wouldn't you expect external parsers to be even worse?

Previous: Matthieu MoyNext: Ramkumar Ramachandra
Message 22 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.