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

Re: [RFC PATCH 0/5] Localise error headers

From
Jeff King <peff@peff.net>
Date
Jan 21, 2017, 14:24 UTC
Message-ID
<20170121142455.qoyqagaw4atic5n6@sigill.intra.peff.net>
In-Reply-To
<CAGZ79kYVFbaMy1_-6qqe9zYQyktE2-7xu1Zz_qyeLWK=scgFKQ@mail.gmail.com>
On Wed, Jan 11, 2017 at 09:15:22AM -0800, Stefan Beller wrote:
Show 12 quoted lines
> > That's the assumption I'm challenging. Certainly the behavior and
> > certain aspects of the output of a plumbing command should remain the
> > same over time. But error messages to stderr?
> 
> In an ideal world that assumption would hold true and any machine
> readable information from the plumbing commands are on stdout and
> nobody in their sane mind would ever try to parse stderr.
> 
> There is no easy way to check though except auditing all the code.
> Having pointed out some string handling mistakes in the prior email,
> my confidence is not high that plumbing commands are that strict about
> separating useful machine output and errors for human consumption.

I think it's impossible to audit all the code, because "all the code" includes things not in git itself. It would really take a willingness to declare "if you are parsing stderr you're doing it wrong".

I suppose the unpack-trees example speaks against that. I'm not sure that is sane overall, but it is something we tried to account for in the past.

If we are just talking about translation, though, it seems like the right action for a script that really wants to parse stderr is to run the sub-command with LC_MESSAGES=C. I know that's a breaking change, but I wonder if it's a reasonable path forward.

-Peff
Previous: Stefan BellerNext: Junio C Hamano
Message 15 of 24 in “Localise error headers”
  1. 0/5 Localise error headersMichael J Gruber, Jan 2, 2017
  2. 1/5 error/warning framework: prepare for l10nMichael J Gruber, Jan 2, 2017
  3. 2/5 error/warn framework: provide localized variantsMichael J Gruber, Jan 2, 2017
  4. 3/5 error/warning framework framework: coccinelli rulesMichael J Gruber, Jan 2, 2017
  5. Duy NguyenJan 3, 2017
  6. Stefan BellerJan 3, 2017
  7. Duy NguyenJan 4, 2017
  8. Duy NguyenJan 7, 2017
  9. Jeff KingJan 4, 2017
  10. Michael J GruberJan 9, 2017
  11. Jeff KingJan 10, 2017
  12. Stefan BellerJan 10, 2017
  13. Jeff KingJan 11, 2017
  14. Stefan BellerJan 11, 2017
  15. Jeff KingJan 21, 2017
  16. Junio C HamanoJan 11, 2017
  17. Duy NguyenJan 20, 2017
  18. Jeff KingJan 21, 2017
  19. Jeff KingJan 21, 2017
  20. Michael J GruberMar 30, 2017
  21. Jeff KingApr 1, 2017
  22. Junio C HamanoApr 1, 2017
  23. Duy NguyenJan 20, 2017
  24. Duy NguyenJan 20, 2017

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.