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

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

From
Jeff King <peff@peff.net>
Date
Oct 29, 2021, 21:10 UTC
Message-ID
<YXxjK8FL3HraUEd0@coredump.intra.peff.net>
In-Reply-To
<xmqqee83k0zx.fsf@gitster.g>
On Fri, Oct 29, 2021 at 01:52:02PM -0700, Junio C Hamano wrote:
Show 12 quoted lines
> > I tend to agree with the above.  Let's not over-engineer things.
> 
> ----- >8 --------- >8 --------- >8 --------- >8 --------- >8 -----
> From: Junio C Hamano <gitster@pobox.com>
> Date: Fri, 29 Oct 2021 13:48:58 -0700
> Subject: [PATCH] Revert "logmsg_reencode(): warn when iconv() fails"
> 
> This reverts commit fd680bc5 (logmsg_reencode(): warn when iconv()
> fails, 2021-08-27).  Throwing a warning for each and every commit
> that gets reencoded, without allowing a way to squelch, would make
> it unpleasant for folks who have to deal with an ancient part of the
> history in an old project that used wrong encoding in the commits.
Thanks for tying this up.

I do think fd680bc5's documentation was good, though. So I'd suggest squashing this in, or applying it on top.

-- >8 --
Subject: [PATCH] log: document --encoding behavior on iconv() failure

We already note that we may produce invalid output when we skip calling iconv() altogether. But we may also do so if iconv() fails, and we have no good alternative. Let's document this to avoid surprising users.

Signed-off-by: Jeff King <peff@peff.net>
---
 Documentation/pretty-options.txt | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/Documentation/pretty-options.txt b/Documentation/pretty-options.txt
index 54d8bb3db0..dc685be363 100644
--- a/Documentation/pretty-options.txt
+++ b/Documentation/pretty-options.txt
@@ -40,7 +40,9 @@ people using 80-column terminals.
 	defaults to UTF-8. Note that if an object claims to be encoded
 	in `X` and we are outputting in `X`, we will output the object
 	verbatim; this means that invalid sequences in the original
-	commit may be copied to the output.
+	commit may be copied to the output. Likewise, if iconv(3) fails
+	to convert the commit, we will quietly output the original
+	object verbatim.
 
 --expand-tabs=<n>::
 --expand-tabs::
-- 
2.33.1.1446.g3ed047b518
Previous: Junio C HamanoNext: Ævar Arnfjörð Bjarmason
Message 21 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.