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

Re: *Really* noisy encoding warnings post-v2.33.0

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Oct 9, 2021, 01:29 UTC
Message-ID
<87ee8vm19j.fsf@evledraar.gmail.com>
In-Reply-To
<87ily7m1mv.fsf@evledraar.gmail.com>
On Sat, Oct 09 2021, Ævar Arnfjörð Bjarmason wrote:
Show 20 quoted lines
> On Fri, Aug 27 2021, Jeff King wrote:
>
> $subject because I think we should really consider backing this out
> before it gets to a real release.
>
> I ran into this while testing the grep coloring patch[1] (but it's
> unrelated). Before this commit e.g.:
>
>     LC_ALL=C ~/g/git/git -P -c i18n.commitEncoding=ascii log --author=Ævar -100|wc -l
>     28333
>
> So ~3k lines for my last 100 commits, but then:
>
>     $ LC_ALL=C ~/g/git/git -P -c i18n.commitEncoding=ascii log --author=Ævar -100 2>&1|grep -c ^warning
>     299
>
> At first I thought it was spewing warnings for every failed re-encoded
> line in some cases, because I get hundreds at a time sometimes, but it's
> because stderr and stdout I/O buffering is different (a common
> case). Adding a "fflush(stderr)" "fixes" that.
It's partially that, but also more pathologically:
    $ git -P -c i18n.commitEncoding=ascii log --author=doesnotexist -1 | wc -l
    0
    $ git -P -c i18n.commitEncoding=ascii log --author=doesnotexist -1 2>&1 |wc -l
    6688

I.e. even if we don't end up emitting anything we'll warn, of course we might not match *because* we failed, e.g. if you had a non-ascii --grep string, but in this case it's rather noisy.

Show 6 quoted lines
> But anyway, I think we've got a lot of users who say *do* want to
> reencode something from say UTF-8 to latin1, but then might have the
> occasional non-latin1 representable data. The old behavior of silently
> falling back is going to be much better for those users, or maybe show
> one warning at the end or something, if you feel it really needs to be
> kept.
Previous: Ævar Arnfjörð BjarmasonNext: Jeff King
Message 12 of 33 in “git log --encoding=HTML is not supported”
  1. Krzysztof ŻelechowskiAug 24, 2021
  2. Bagas SanjayaAug 24, 2021
  3. Krzysztof ŻelechowskiAug 24, 2021
  4. Bagas SanjayaAug 24, 2021
  5. Junio C HamanoAug 24, 2021
  6. Jeff KingAug 25, 2021
  7. Junio C HamanoAug 25, 2021
  8. Jeff KingAug 27, 2021
  9. Jeff KingAug 27, 2021
  10. Junio C HamanoAug 27, 2021
  11. *Really* noisy encoding warnings post-v2.33.0Ævar Arnfjörð Bjarmason, Oct 9, 2021
  12. Ævar Arnfjörð BjarmasonOct 9, 2021
  13. Jeff KingOct 9, 2021
  14. Jeff KingOct 9, 2021
  15. Ævar Arnfjörð BjarmasonOct 9, 2021
  16. Jeff KingOct 27, 2021
  17. Ævar Arnfjörð BjarmasonOct 29, 2021
  18. Jeff KingOct 29, 2021
  19. Junio C HamanoOct 29, 2021
  20. Junio C HamanoOct 29, 2021
  21. Jeff KingOct 29, 2021
  22. Ævar Arnfjörð BjarmasonOct 22, 2021
  23. Johannes SixtOct 10, 2021
  24. Ævar Arnfjörð BjarmasonOct 10, 2021
  25. Krzysztof ŻelechowskiAug 25, 2021
  26. Jeff KingAug 27, 2021
  27. Krzysztof ŻelechowskiAug 25, 2021
  28. Bryan TurnerAug 25, 2021
  29. Junio C HamanoAug 26, 2021
  30. Krzysztof ŻelechowskiAug 26, 2021
  31. Junio C HamanoAug 27, 2021
  32. Jeff KingAug 27, 2021
  33. Junio C HamanoAug 27, 2021

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.