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

Re: git log --encoding=HTML is not supported

From
Jeff King <peff@peff.net>
Date
Aug 27, 2021, 18:37 UTC
Message-ID
<YSkw6DSHenXHGx0b@coredump.intra.peff.net>
In-Reply-To
<xmqqk0k6c1zn.fsf@gitster.g>
On Fri, Aug 27, 2021 at 08:59:40AM -0700, Junio C Hamano wrote:
Show 17 quoted lines
> Krzysztof Żelechowski <giecrilj@stegny.2a.pl> writes:
> 
> > Dnia czwartek, 26 sierpnia 2021 17:37:40 CEST Junio C Hamano pisze:
> >>         git log --html \
> >>                 --format='<tr><td>%h</td><td>%s</td>...</tr>'
> >
> > I would like to be able to say:
> >  { git config i18n.logOutputEscape HTML; }
> >
> > What do you think?
> 
> It depends on what it does.
> 
> If the configuration means that "git log" output (with any supported
> options, like "-p") will be given with '<' written to '^lt;' etc. so
> that it becomes safe to dump it in HTML, it fails to interest me at
> all.

Yeah, I think things get pretty weird when you start thinking about dumping whole filenames and diff contents.

I wouldn't be opposed to an option for the pretty formatter to have encodings. Something like:

  git log --format='%(authorname:quote=html)'

I'd probably put off implementing that until we actually unify the for-each-ref and pretty formats, though (we do not even have %(authorname) at this point!). The latter already has a quoting mechanism for shell/perl/python/tcl (though it is not per-atom, and I wouldn't be opposed to a --format-quote option that quoted all pretty.c placeholders).

-Peff
Previous: Junio C HamanoNext: Junio C Hamano
Message 32 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.